You really have two questions here - one about electromagnetic waves and the other about how light (photons) behave near a black hole.
1. The electromagnetic theory of light was established on firm ground by James Maxwell back in the late 1800's. He showed that light is actually a combination of changing electric and magnetic fields (hence the term "electromagnetic radiation"). With a series of 4 inter-related equations he showed that a changing electric field causes a magnetic field to be created. And that the changing magnetic field causes an electric field to be created. Each of these fields are sine waves at 90 degrees to each other and are self-propogating. The speed of light, c, comes directly from Maxwell's equations. If you'd like to learn more and delve into the mathematics see:
Maxwell's equations - Wikipedia, the free encyclopedia
2. Maxwell's equations do a brilliant job of showing how electromagnetic waves propagate in a vacuum, but this was before experiments later showed the dual nature of light - that light can be considered as either a wave (like Maxwell decribed) or as particles called photons. Einstein showed that when considered as particles light photons appear to bend in a gravitational field. It's not because the massless particles are somehow attracted by the gravitational force, but rather that the presence of a large mass causes a curvature in space itself, and from a photon's perspective the shortest distance between two points actually inviolves curving through normal 3D space. One pretty intuitive explanation involves the equivalence between gravity and acceleration. Einstein postulated that it's impossible for an observer in a closed area (such as an elevator) to distinguish between the effects of acceleration and the effects of being in a gravitational field. Consider the following thought experiment: imagine you are in an elevator car that is stationary on earth - you would feel 1 G of force, due to earth's normal gravity. Now consider what it would be like to be in space far from earth and the elevator has a rocket attached that accelerates it at 1g - you will again feel 1 G of force. So a 1G gravitational field feels exactly like 1g of acceleration, and it's actually impossible to tell the difference without looking outside to see whether you are accelerating or not. Now consider what happens if the elevator is accelerating upward and someone shoots a ray gun in through the side. As a passenger in the elevator you would see the stream of photons entering from the side and appearing to bend slightly downward, since the elevator car has moved upward some distance in the time it takes for each photon to traverse the width of the car. Same effect as if you were driving your car down the street and someone shot a stream of water through your open front car window as you drove past - the stream of water would enter through the open front window and may actually hit someone sitting in the back seat, since the car moves forward some distance in the time it takes for the water droplets to moves across the width of the car. If you're traveling at a constant speed the water appears to enter the window at an angle and travels across the car at that constant angle (in a straight line). But if the car is accelerating, the stream of water would appear to people in the car to curve towards the back. Hopefully this isn't too hard to visualize.
OK, so if an observer on an accelerating elevator would see light bending, and if you accept Einstein's equivalence principal, then you can see that light must also appear to bend in the presence of gravity. Of course this doesn't explain why the equivalence principal is true - hence Einstein postulated the concept of gravity causing a bending of space itself, which in turn causes us to perceive that the light rays are bent by gravity.
Hope this helps.