If photons are massless, why can't light escape the gravitational pull off a blackhole which has gravity at its singularity.?

Gravity is a product of masses in play. So why should light, which is composed of photons which are massless be attracted towards a blackhole? Is there something we are missing about gravity?
20 answers 20