That's the whole point of Einstein's Theory of General Relativity. Gravity is essentially a manifestation of the curvature of space-time, which affects everything, including photons.
Photons have long been described as massless particles which don't interact with each other
Einstein's Theory of General Relativity says that they do interact with each other.