Newton said the speed of gravity is infinite but according to Einstein (and some nifty interstellar measurements), it most certainly is not.
But in general relativity, things are much more intricate, and incredibly interesting. First off, it isn't mass, per se, that causes gravity. Rather, all forms of energy (including mass) affect the curvature of space. So for the Sun and the Earth, the incredibly large mass of the Sun dominates the curvature of space, and the Earth travels in an orbit along that curved space.
If you simply took the Sun away, space would go back to being flat, but it wouldn't do so right away at every point. In fact, just like the surface of a pond when you drop something into it, it snaps back to being flat, and the disturbances send ripples outward!
Nothing like a little science on the Moon, I always say.
Astronaut David Scott in 1971, from the Apollo 15 Lunar Surface Journal. Scott was part of the Apollo 15 crew, and applied Galileo's findings about gravity and mass by testing a falcon feather and a hammer. The film, shown in countless high school physics classes, is the nerdy, oft-neglected cousin of Neil Armstrong's space paces.
Now you're probably wondering where the rest of the depth data comes from if there are such big gaps from echosounding. We do our best to predict what the sea floor looks like based on what we can measure much more easily: the water surface. Above large underwater mountains (seamounts), the surface of the ocean is actually higher than in surrounding areas. These seamounts actually increase gravity in the area, which attracts more water and causes sea level to be slightly higher. The changes in water height are measurable using radar on satellites.