You are right in your first sentence -- light cannot accelerate.
The paradox of the second sentence is resolved by noticing that a
large piece of space with a gravitating mass in it does not constitute
an "inertial reference frame". Newton's first law says that an object
with no force on it travels in a straight line at constant speed, if it
is measured in an inertial reference frame. To observe a deviation from
"straight" means either there is some acceleration going on, or the
reference frame is not inertial, or both.
Einstein's general theory of relativity is built on top of the
special theory of relativity, and says that everywhere, space is
"locally Lorentzian", in that if you look in a small enough patch,
light should travel in straight lines where straight is defined by
Euclidean geometry. But on larger distance scales, when gravity is
present, the definition of "straight" gets changed to "that path a
light ray takes", which may not agree with the Euclidean idea of
A fun read is the first couple of chapters of Misner, Thorne, and Wheeler's otherwise daunting book, "Gravitation".
(published on 10/22/2007)