The atmosphere is held to the Earth due to:
Gravitational force of Earth
The atmosphere is held to the Earth due to gravitational force of Earth. The gases in the atmosphere have a mass and hence Earth attracts them, as a result of which the gases do not escape from Earth.