The common factor is that the complete interaction includes velocity-dependent effects.
In the case of electromagnetism: the Lorentz force is velocity-dependent.
Newtonian gravity is purely position dependent, and that has implications for what has to be assumed about the speed of gravity.
A theory of gravity in which gravity is purely position dependent, and with a finite speed of gravity, is a theory that does not comply with the principle of conservation of momentum. (The problem is often referred to as 'force aberration'; with a finite speed of propagation (and pure position dependence) the force does not point instantaneously to the point where the attracting body is.)
Maxwell's equations for the electromagnetic field imply a particular speed for the propagation of the electromagnetic interaction: the speed of light.
Given that it was recognized that electromagnetic interaction propagates at a finite speed physicists began to explore possibilities of formulating a theory of gravity with a finite speed for the propagation of the gravitatitional interaction.
The physicists of the time recognized that a theory of gravity with a finite speed of propagation would have the potential of accounting for the anomalous precession of Mercury.
In order for such a theory to comply with conservation of momentum the interaction must include velocity-dependent effects, in just the right way.
The constraint of compliance with the principle of conservation of momentum narrows down the possibilities. In that sense it is very much a guiding constraint.
Einstein's 1915 General Relativity rendered all previous attempts at formulating finite-speed theory of gravity obsolete.
For more information:
1999 article by Steve Carlip:
'Aberration and the speed of Gravity'
Carlip discusses the interconnections between speed of propagation of an interaction, velocity-dependent effects of the interaction, and the emission of waves.