When light traveling in space passes through the time gradient of a massive body it will go slower and its path will be diverted to some extent toward the body. This is something similar to the refraction of light, but not for the same reason. A refractive medium appears to change the speed of light because the light interacts with the molecules of the medium. A time gradient actually does change the speed of light. The time gradient in effect acts somewhat like a medium with a variable refractive index, with the index increasing as the gradient gets denser (or the distance from the body decreases).
One way of looking at this is described by Epstein[1] who relates the bending of light to the difference in speed of the upper part and the lower part of a beam of light when it is passing through a gravitational field.
[1] Epstein, Lewis Carroll, “Relativity Visualized”, Insight Press, San Francisco, 1992, p 145. This is in a boxed discussion which includes Figure 9-10.