Gravity is the force that attracts objects with mass toward one another. It governs the motion of planets, stars, and galaxies, keeping planets in orbit around stars and moons around planets. Gravity also shapes celestial objects, creating spherical shapes and forming systems like galaxies and black holes, influencing the overall structure of the universe.