The Sun's immense gravity is what holds all the planets in its orbit, just like a giant cosmic slingshot keeps them spinning around it.