Indeed, there are connections between electromagnetism and gravity, through relativity theory.
Electromagnetism is described by the Maxwell equations which have the curious property of having one velocity, $c$, which is everywhere. But these equations do not specify a reference frame. This suggested an ether to which this velocity is relative to. With the Michelson–Morley experiment, this was ruled out. So there is one velocity which is the same in every frame of reference. The consequence is that the addition (and general transformation) of velocities was changed, this is special relativity theory.
General relativity then also described gravity and the gravitational waves that you seem to mean. The only velocity in the theory is $c$, so these also travel with the speed of light because that is an intrinsic property of spacetime.
Another way of phrasing, though relating to quantum aspects: Electromagnetism is mediated by photons, which have infinite range. Therefore they must be massless bosons. Similarly gravity has infinite range, therefore its force carriers (the proposed graviton) must also be massless. Massless particles travel with the speed of light, therefore excitations in the electromagnetic and gravitational field travel with the same speed.
The speed of sound in air or water is a different effect. These are longitudinal pressure waves. The speed is determined by the density of the medium and the (gas) pressure. But sound also creates gravitational waves (though immeasurably small) which will travel with the speed of light.