Does gravity affect the speed of light

Yes, it bends.

As per Quantum Theory, light has momentum (= 2TT / (wavelength); I think) and that makes it follow the curvature of space which is pronounced in the vicinity of massive bodies like stars. Einstein proved it (with his mind-boggling equations) in the earlier part of the last century. But, people wanted proof. He (as usual) couldn't be bothered of it, throwing hints that it is their job. In 1960s scientists hatched an experiment to see the stars around the Sun, when it was blotted out totally by Moon, a Solar Eclipse. There was an imminent Solar Eclipse along the equator in Africa which is much more favourable for such a study. They carried out their studies on an Airplane flying in the shadow (at 1000miles an hour). The photograph revealed an enlarged picture of constellations around Sun, which emerged in that near darkness. Enlargement was measured in comparison to when the same region of the sky was photographed six months later (no need to work out the scale factor or any such). The rays from stars actually deviated inwards under the influence of Sun' s gravity as per the predicted amount in Einstein's formulation of the phenomenon. A practical use is the 'gravitational lense' or 'lensing'.

Parallely, Karl Schwartzchild's (1916) formulation

M= {Gm} / {c^2}, where the solution contained a term of the form 1/ {2M-r} making it a singularity (that blows up to 'infinity' in Maths) also runs on the same lines. We now call it 'Black Hole' into which the light bends in. Einstein was not convinced and called it "Hadamard disaster" because Hadamard suggested in Paris 1922. No wonder the great Mathematician Hadamard was thinking like some of the questioners in these columns, that are normally pooh-poohed. His singular contribution 'Hadamard matrix' - all 'ones' of a 2 X 2 matrix but with the right/lower one with (-) ve sign, multiplying it over/scaling it up into 2^k matrices is his greatest, used in Image (signal) processing; if you ask me.

The moral of the story is for a great achievement that is purely in the mind, great minds should think alike or in unison. There is an incantation to this in the "Upanishads" which the Rshis invoked. It is like, 'let's think together, eat together and put all energies in unison to achieve greater things in life'.

Source(s): Wiki