In physics speed means the magnitude of the velocity vector. Velocity is the first derivative of position with respect to time, and it's a vector in 3D space (technically 4D). If you change the orientation of that vector (direction change) that is always an acceleration even if the magnitude of the vector doesn't change.
So when light goes thru a gravitational field it doesn't change direction (EVEN though gravitational lensing is happening, from the perspective of an observer). If it did change direction that would be synonymous with an acceleration, and light never accelerates.