This answer will be quiet hard for you to understand.but glad that you are curious about that.this is higher physics and you won't be asked about mass of light in you exams.but for understanding i provide you this answer.
In simple terms, Gravity does not attract anything as it's not a Force. According to Einstein, Gravity is a property of SpaceTime and merely caused by bending of SpaceTime around objects. These objects when massive like a Planet , Star or a Black Hole bend SpaceTime to varying extents in increasing order based on their own mass.
Light is composed of Photons which is really Matter (by virtue of being composed of Energy) made up of smaller particles which have zero charge, zero rest mass, and has a spin 1 particle (a boson). Google why Photon is matter even when having no rest mass, for further details.
Since Gravity is a property of SpaceTime, it merely deflects light and not attract it, if there is more bending of SpaceTime, there will be more deflection.
When you say Light can't escape a Black Hole it means that the Bending of Space Time is so great inside a Black Hole that Light can't be deflected further and travels infinitely inside The Black Hole.
Imagine a massive Waterfall, you are on top of it pedaling your boat in the opposite direction, you reach the very end of the Waterfall because the force of the water falling is much higher than your rate of pedaling, there will be a moment of 'just starting to fall' before you fall and then you start falling, Black Hole is that waterfall but it has no Bottom so you keep falling infinitely, never landing or never to be seen again beyond the point of 'just falling'.
The point of 'just about to fall' is called the Event Horizon which to an External Observer appears to be frozen.
We do not know what happens beyond this point. The laws of Physics break down and it's unpredictable what happens next. There is no information transfer beyond this point.