The beding of light in the presence of a gravitational filed is one of the predictions of general relativity, and in fact was used as evidence to support the theory in a famous experiment conducted by Arthur Eddington in 1919 during a solar eclipse. The idea behind the experiment was to detect the deflection of light from a distant star as the light passed close to the Sun. The experiment could only be conducted during an eclipse because the light from the Sun would make the star invisible otherwise.
A more extreme effect is gravitational lensing. A massive galaxy can deflect the light from distant sources of light e.g. quasars to produce multiple images of an object. The Massive galaxy is acting as a lens to bring light from the quasar to a focus.