gravity applies to everything with mass. But also light which has no mass.
Photons have no rest (invariant) mass, and gravity doesn’t directly affect photons, but does warp the spacetime that the photons travel through. That said, photons do possess energy which can also affect things gravitationally, even other photons.
This isn’t the first time, I’m hearing about light being affected by gravity, but like, are we saying that electric fields and magnetic fields are not affected by gravity… except they are, when they oscillate back and forth in the form of an electromagnetic wave?
My understanding of EM fields compels me to say that they are affected by gravity because the mediating particles are.
Yeah… about that… I have nothing clever to say.
Our laws of physics aren’t really suited for it, and everything seems so round-about that it looks like that time when people tried to argue for having Earth be the centre of the solar system. It’s all just patches to something that we know isn’t that simple.