Yes, light is affected by gravity, but not in its speed. General Relativity (our best guess as to how the Universe works) gives two effects of gravity onlight. It can bend light (which includeseffects such as gravitational lensing), and it can change the energy oflight.