The only way that these forces are related is the fact that gravity and electromagnetism are two of the four universal and distinct forces of the universe! These two forces are not the same in any way & are not related to each other except as mentioned.
The other two being the strong & weak nuclear forces.
Look up a good article from the internet on the 4 universal forces for more explanation!