Which objects gravity holds the planets in their orbits?

The sun's gravity holds the planets in their orbits. It also holds other space objects in their orbits, such as asteroids.