Dear student,
The Sun's gravitational pull keeps our planet orbiting the Sun. The motion of the Moon is affected by the gravity of the Sun and the Earth. The Moon's gravity pulls on the Earth and makes the tides rise and fall every day.
The gravitational force between the Earth and the molecules of gas in the atmosphere is strong enough to hold the atmosphere close to our surface
Regards