Light takes eight minutes to travel from the Sun to Earth, does gravity? No, but it’s a bit more complicated than that. To keep it simple, let’s use light to describe what we know.
While light does travel, gravity exists everywhere, all at once as part of the fabric of the universe. That’s what Einstein figured out. Now, if the Sun disappeared, would we feel the effects of that gravity instantly? And then eight minutes later see the Sun disappear? Before Einstein, the answer was yes! Newton described gravity as a force that acts on objects with mass instantaneously.
Einstein showed “the effects” of gravity also travel at the speed of light. So, that “yes” answer went to “no.” So, if the Sun disappeared, we would see and feel the effects eight minutes later.
Einstein’s General Relativity says that thinking of gravity as “traveling instantly” was the wrong way to think about it. In essence, he figured out that gravity is everywhere, all at once. As it changes, those effects change the fabric of spacetime, and those changes ripple out like a wave at the speed of light.
Thinking about whether gravity travels or some how exists everywhere is a great introductory tool to particle physics. Now that you’ve come this far, take the 5-minute deep dive: Empty Space: A Dive into Particle Physics.