We study one-dimensional motions of polytropic gas governed by the compressible Euler equations. The problem on the half space under a constant gravity gives an equilibrium which has free boundary touching the vacuum and the linearized approximation at this equilibrium gives time periodic solutions. But it is difficult to justify the existence of long-time true solutions for which this time periodic solution is the first approximation. The situation is in contrast to the problem of free motions without gravity. The reason is that the usual iteration method for quasilinear hyperbolic problem cannot be used because of the loss of regularities which causes from the touch with the vacuum. Due to this reason, we try to find a family of solutions expanded by a small parameter and apply the Nash–Moser Theorem to justify this expansion. Note that the application of Nash–Moser Theorem is necessary for the sake of conquest of the trouble with loss of regularities, and the justification of the applicability requires a very delicate analysis of the problem.