Take an ice rink, a nice flat surface. Toss a hockey puck across it. How does it travel? I'm betting you know it goes straight.
This is essentially what everything wants to do unless theres an outside force. An astute observer notes that photons have exactly 0 mass -- no mass, not even a tiny bit, not even undetectably small, nothing, zero, exactly zero, not even a tiny "dm" of mass; and that since F=ma, for a photon F must always be 0.
But, black holes warp space and time so much that they alter the meaning of straight. It no longer is straight according to us. It's straight meaning the shortest path from a to b. On a flat plane, this is a line. But in a different topology, say a curved space, this will ALWAYS be a curve. This is how light can be bent around objects. It is the warped space-time that alters the geometric manifold that the Universe obeys within that region. This alters the meaning of a straight line (in essence, photons always take the geodesic -- minimum distance path). But near a black hole, the geodesic can be a path that leads straight into the black hole, regardless of whether or not it can escape.
And an electron's mass is not negligible. If you want to talk negligible masses, go talk about neutrinos.
Somewhat related to gravitational lensing, except here the masses aren't big enough to "suck" in the light, only big enough to severely distort it.