Earth's gravity is strong enough to hold onto its atmosphere and keep it from drifting into space.
Thanks to Earth's gravity, the atmosphere doesn't escape into space. Gravity pushes down on Earth's atmosphere, keeping its air from drifting away, according to the National Oceanic and Atmospheric Administration's SciJinks online earth science education website.