Light doesn’t accelerate in a gravitational field, which things with mass would do, because light has a universally constant velocity. Why is that exception?
Another way to answer this question is to apply the Equivalence Principle, which Einstein called his "happiest thought" (so you know it has to be good). The equivalence principle says that if you are in an enclosed box in the presence of what Newton would call a gravitational field, then everything that happens in that box must be the same as if the box was not in a gravitational field, but accelerating upward instead. So when you release a ball, you can imagine the ball is accelerated downward by gravity, or you can imagine everything but the ball is accelerated upward, and the ball is simply being left behind (which, ironically, checks better with the stresses you can easily detect on every object around you that are not present on the ball, including the feeling you are receiving from your bottom right now).
Given that rule, it is easy to see how light would be affected by gravity-- simply imagine shining a laser horizontally. In the "left behind" reference frame, we see what would happen-- the beam would start from a sequentially higher and higher point, and that raising effect is accelerating. So given the finite speed of light, the shape of the beam would appear to curve downward, and the beam would not strike the point on the wall of the box directly opposite the laser. Therefore, this must also be what is perceived from inside the box-- the beam does not strike the point directly across from the laser (as that point is getting higher then the point across from it where the light was emitted), and its path appears to curve downward. Ergo, light "falls."
Indeed, this is the crucial simplification of the Equivalence Principle-- you never need to know what the substance is, all substances "fall the same" because it's nothing happening to the substance, it is just the consequences of being "left behind" by whatever actually does have forces on it and is actually accelerating.
Incidentally, it is interesting to note that even in Newtonian gravity, massless objects would "fall the same" as those with mass, but to see it requires taking a limit. Simply drop a ball in a vacuum, then a lower mass ball, then a lower still mass. All objects fall the same under Newtonian gravity. So simply proceed to the limit of zero mass, you will not see any difference along the path of that limit. Nevertheless, Newtonian gravity doesn't get the answer quite right for the trajectory of light in gravity, because Newtonian physics doesn't treat the speed of light correctly.
There are a couple of ways one could approach your question:
Black holes are regions of space that have been deformed by a sufficiently concentrated mass. Light waves/particles always travel in a straight line at a constant velocity ($c$). Although a photon approaching a black hole will continue traveling in a straight line through space, space itself has curved so the photon's path will curve.
While photons don't speed up in the presence of a gravity well, they are affected by it in other ways. In specific, photons entering a gravity well are blue-shifted while photons leaving one are red-shifted. This red/blue-shifting happens because time passes slower within a gravity well than without. In all frames of reference, though, the speed of light remains constant. There's more info on this on the wiki.
Note: The question originally referred specifically to black holes. The above hold for any concentration of matter (of which black holes are an extreme example).
TL;DR Light is affected by gravity because it travels along the space-time grid and its curvature which IS gravity. This gets very visible in black holes.
also: Einstein > Newton
Black holes are black because no light that crosses the "Event Horizon" can escape ever again. Mass bends the "grid" of space-time. Light - 2-dimensionally speaking - travels along the floor of the space-time grid and follows its curvature i.e. it goes down a cone created by a presence of mass, and moves along the shortest path outwards again. This makes the journey of the light take longer. Now for a black hole things are more extreme: A black hole forms, when a lot of matter is crammed into a space that is at or smaller than the Schwarzschild Radius. The Schwarzschild Radius of any stellar object is determined solely by its mass. Any mass with a high enough denisty turns into a black hole:
rs = 2 * G / 2 c
Schwarzschild Radius =
2* the gravitational constant / 2 * the speed of light.
Multiply that with
M, the mass of an object in kg and you got the rs for that mass.
To understand however how black holes curve space so much that they let no light escape, we must look at only a small part of Schwarzschilds equation.
To paint an image for understanding black holes, we only need this middle section:
1) 2) 3) 4)
We've already established rs as being the Schwarzschild Radius of a particular object, r is the radius of the stellar object. When r becomes as small as rs you get a singularity1 and weird stuff starts happening, most importantly to OPs question, the space-time curvature at the black hole becomes infinite(!), this means that any light that intersects the event horizon at any point will take an infinite amount of time to travel across the black holes funnel.
Here are some extra visalisiations:
Gravity space-time cone of earth:
Gravity space-time funnel of a black hole:
- Singularity: A singularity is basically, in calculus/algebra terms, just when you divide by zero. A 2D singularity might just look like this:
f(x) = 1/x(the singularity is there in the middle at x=0).
A 3D singularity can look like this /, singularity at x=1 (this is Riemanns zeta function).
Acceleration is not relevant here. Any given gravity well has a definable escape velocity. Particles faster then that velocity escape the well, particles slower do not. The very definition of a black hole is a gravity well (hole) where the escape velocity exceeds 'c' the speed of light particles, so by definition, light can not escape from the hole, making it 'black'.
If light has no mass, why is it affected by gravity?
Because light has a wave nature, and a gravitational field is a place where the speed of light varies. So light curves downwards. It's rather like the way sonar waves tend to curve downwards in the sea:
Image from FAS and the US Navy, see course ES310 chapter 20
Light doesn’t speed up its acceleration, which things with mass would do, because light has a universally constant velocity. Why is that exception?
That's not right I'm afraid. See what Einstein said:
1912: “On the other hand I am of the view that the principle of the constancy of the velocity of light can be maintained only insofar as one restricts oneself to spatio-temporal regions of constant gravitational potential”.
1913: “I arrived at the result that the velocity of light is not to be regarded as independent of the gravitational potential. Thus the principle of the constancy of the velocity of light is incompatible with the equivalence hypothesis”.
1914: “In the case where we drop the postulate of the constancy of the velocity of light, there exists, a priori, no privileged coordinate systems.”
1915: “the writer of these lines is of the opinion that the theory of relativity is still in need of generalization, in the sense that the principle of the constancy of the velocity of light is to be abandoned”.
1916: “In the second place our result shows that, according to the general theory of relativity, the law of the constancy of the velocity of light in vacuo, which constitutes one of the two fundamental assumptions in the special theory of relativity and to which we have already frequently referred, cannot claim any unlimited validity”.
1920: “Second, this consequence shows that the law of the constancy of the speed of light no longer holds, according to the general theory of relativity, in spaces that have gravitational fields. As a simple geometric consideration shows, the curvature of light rays occurs only in spaces where the speed of light is spatially variable”.
Einstein also spoke of “the refraction of light rays by the gravitational field”. So did Newton, see Opticks query 20: “Doth not this aethereal medium in passing out of water, glass, crystal, and other compact and dense bodies in empty spaces, grow denser and denser by degrees, and by that means refract the rays of light not in a point, but by bending them gradually in curve lines?” It really is a refraction, and gravitational lensing is an appropriate phrase. Also see the GR section of Is The Speed of Light Everywhere the Same? It’s a PhysicsFAQ article by editor Don Koks. He talks about Einstein and refraction, and says this: "light speeds up as it ascends from floor to ceiling, and it slows down as it descends from ceiling to floor; it's not like a ball that slows on the way up and goes faster on the way down". Isn't that interesting?
A lot of people will tell you that light curves "because it follows the curvature of spacetime", but that isn't right either. Spacetime curvature is associated with the tidal force, not the force of gravity. See my "physics detective" articles on the speed of light and how gravity works for details and references.