Sand at rest really does not behave like a liquid, it behaves more like a solid. When you hit the surface of a flattened sand pile with a flat large object, there will only be a negligible wave in the grain density within the bulk of the pile. In fact, the dominant wave will be a complicated sound-wave within the grains, passed by interfaces between them, and this will be dissipated very quickly because of the imperfections.
But sand does start to behave a little bit like a very special liquid if it is in a special dynamical and dense enough regime which is called a granular flow (here you are correct that gravity typically helps maintain the higher density). The formal criterion is that it must exhibit a sufficiently large shear rate or gradient of average velocities. An example of this would be the moving parts of a pile of sand when it is being poured from a silo. Then, it is possible to write down an effective set of Navier-Stokes equations for its behavior in terms of densities, pressure, and bulk velocities, which are the same type of equations that govern the dynamics of water.
Beware, however, that even in this mode the behavior of the "sand liquids" is that of a highly Non-Newtonian fluid, putting it on par with the behavior of fluids such as thick slime, resin or ketchup. One particular feature includes the fact that the interaction between the layers of the sand of different velocities will depend in rather non-intuitive ways on the relative velocity of the layers. The dissipation in the grain flow is also very high and without external driving, it will quickly kill any shearing. And once the shearing rate drops below the critical level, the grain flow "freezes out" and suddenly behaves more like a solid again.
Finally, when the sand gets very thin and highly agitated (individual grains receive a lot of random kinetic energy), it may behave as a gas for a short time. The key criterion for this mode is that the grains do not collide too much between themselves and the walls (that dissipates a lot of the kinetic energy). This can be hard to sustain if the grains are heavy and when gravity is present. On the other hand, very light grains can really become a "minor gas-like component" of air for longer amounts of time since the air drag (collisions with air molecules) tends to synchronize the grain velocity with the bulk of the air.
As for your question with the "surface wave" on a pile of sand. This is really quite amusing, because I believe all three modes will typically be present. When you hit the surface of the sand with a small object, the sand will move at that point and create local shearing. Possibly, a part of the sand will eject in the air to be "gas-like" for a moment. However, the shearing in the sand that actually stays in the pile does allow for a fluid-type behaviour for a short moment, creating a wave-like ripple. Nevertheless, the relative velocities get quickly dissipated and the ripple freezes out.
So, ending with a tip for creating sand-liquid waves: try making one in a sand pile that is pressed between two cylinders that rotate at different angular velocities so that the shearing rate in the sand is higher than the critical one. It might then be possible to obtain wave-like phenomena!
(A scientific paper on the topic of granular flows that I found particularly clear is A new constitutive law for dense granular flows by Pierre Jop, Yoël Forterre & Olivier Pouliquen)
EDIT: I just noticed that Cort Ammon posted a link to this Liquid sand youtube video by Mark Robber, where a "fluidized bed" is created by letting air bubble through the sand from below. A fluidized bed is created when the drag of the air from below almost precisely counters the gravitational forces on the individual grains. The point is only indirectly about countering gravity. The main point is about getting the grains out of contact, so that they do not dissipate energy as quickly. As a result, less shearing is needed to sustain a fluid-like behavior, and that is also provided by the uneven air flow. Quite ingenious!