What an excellent question, Will! I too wondered about this when I started to learn the wonders of physics. To answer this, we must first explain three things: 1) what is light, 2) what is gravity, ...
The question has been debated ever since Newton. But physicists are still in the dark about whether light is 1) a wave, 2) a particle or 3) a combination of both. Sometimes it behaves like one, ...