Explanation:
Light is clearly affected by gravity, just think about a black hole, but light supposedly has no mass and gravity only affects objects with mass. On the other hand, if light does have mass then doesn't mass become infinitely larger the closer to the speed of light an object travels.
Sir Isaac Newton concluded that two factors—inertia and gravity–combine to keep Earth in orbit around the sun, and the moon in orbit around Earth. Hope this helps!