Answer: Gravity influences electromagnetic waves (light.) Gravity bends light because it bends space time itself. Since electromagnetism is what holds matter together Gravity depends on electromagnetism to function. Electromagnetism is much more powerful than gravity, so it serves as the source of nucleation.
An electromagnet is an object that uses electricity from a battery to become magnetic. An electromagnet uses the electromagnetism force to function. Some electromagnets are more powerful than others. For example, an electromagnet using a D battery will pick up more paper clips than an electromagnet with AA battery. This is because the magnet gets stronger as the electric current becomes more powerful.
Einstein's idea of gravity was that space is actually a fabric and there's actually something there that we can't detect. He believed that the emptiness it space actually had a substance to it, which he would model out in a three dimensional grid. When mass is added to the cube space bends all around it in all directions, so the grid lines get distorted and space becomes curved. Any object added into space will create a bend or warp of the space-time continuum. The gravity model above represents this. The fabric over the bowl bends when weights are put in it. Then when a marble is placed in the bowl it rolls and orbits towards the weights because of gravity.