a_lost_packet is exactly right. Here's a useful thought experiment:
Imagine you're in an elevator which is accelerating upward at a very high speed. Suppose at one point, someone shines a light beam through a window in the elevator. What will the path of that light beam be? Well, obviously it will appear to curve down, since the elevator has moved up by the time the light (traveling on a straight line) gets to the other side. So you have an instance in which light thinks it's traveling in a straight line - and is obviously still traveling at the speed of light - but is curved in your accelerated frame.
In fact (extra fun bonus) this is exactly how they discovered the gravitational bending of light that you're talking about. One of Einstein's biggest breakthroughs - possibly his biggest - was the equivalence principle, which can be interpreted as saying that an accelerating frame (such as this elevator) is equivalent to one in a gravitational field. So any experiment you run in that elevator will have the exact same results as if the elevator were stationary in an equivalent gravitational field. Naturally that includes the bending of light.
Note that at no point has the speed of light changed - it's following what looks to us like a curved path, but what it thinks is a straight path, called a spacetime geodesic. A geodesic through a curved surface is a curved line which in fact happens to be the shortest distance between two points, which is what a straight line normally does. Think of longitude lines on the surface of a sphere - they're curved paths but they're geodesics because between any two points on the longitude line, a segment of that line is the shortest path between them.