| MadSci Network: Astronomy |
While it is true that light (more precisely, photons) has no rest mass, it does have energy. Einstein showed the equivalence of mass and energy, illustrated in the familiar equation E = mc^2 (E is the energy, m is the mass and c^2 is the speed of light squared). Thus, gravity affects anything that has any energy (which would mean everything in the universe).
One interesting point here, though, is to remember Galileo's result that objects of different mass fall at the same rate in a gravitational field. One can see this from Newton's law of gravitation, and it winds up being a key point in the theory of General Relativity (the currently accepted theory of gravity). Without going into details, and assuming the gravitating mass to be very large, a blue photon (more energy) and a red photon (less energy) with the same initial direction will follow the same paths as they are bent by gravity.
Try the links in the MadSci Library for more information on Astronomy.