Gravity does not directly bend light. Instead, high gravitational fields can cause bending in space-time, causing light to travel along the resulting distorted paths of space-time.
While photons do not have rest mass, they do have momentum, enabling their interaction with space-time. While gravity is a force in the Newtonian model, it is the result of the inherent warping of the shape of the universe by massive objects in general relativity. All paths of motion, including the motion of light, are warped by this warping of shape.
This light bending results in the gravitational lens effect, where the presence of matter between a light source and an observer leads to the bending of light toward the body as it travels to the observer. The more massive and dense the intervening matter, the more the space-time between source and observer is warped, and the more pronounced the gravitational lensing effect is.
Light bending can also indirectly result from relativistic orthogonal acceleration. For example, an observer holding a flashlight horizontally in an elevator moving upward at a tremendous acceleration would notice the beam deflecting downwards. This is because acceleration and gravity are equivalent in general relativity. This phenomenon is called principle equivalence and has been used on microelectrical mechanical systems on orbiting satellites.