It will have at least a dozen generators. Probably two. They won't be for full operation of the airport though, only emergency and critical systems: emergency lighting, a few lifts for emergency escape, and airside will likely have its own UPS and generator systems for ATC, runway lighting, comms, etc. What they won't have backup power for is the whole terminus, so whilst they can still process a few passports and whatnot, they'll be down to a handful of PCs versus the whole shebang. The airport will still function, but at absolute minimum levels. They'll be able to process incoming passengers, albeit very slowly, but in order to shed some load they'll have to shut down all outgoing flights.
What also needs to be factored in is how much diesel they have for their generators, generally as a rule of thumb somewhere like Heathrow would be looking at 24h of runtime at max load, however this assumes that they are maintaining and monitoring their systems correctly, which I can say is more than likely not the case. To complicate matters worse, a lot of companies have taken on the additional risk of not buying diesel for the last year or so as they intend to transition to HVO, but don't want to waste the thousands of litres of diesel they have on site. Also also, red diesel was recently banned from static generator use so their diesel costs will have gone up significantly, so they might not even have their tanks full.
Of course the overarching question here is whether Heathrow is single fed, I very much doubt it, but in order to switch to another incoming supply, they'll need a few HVAPs (High Voltage Authorized Person), who will need to write a switching schedule which will need to be signed off by their SAP and tons of measure will need to be put in place before any switching can begin. It's a long, drawn out process and if anything goes wrong in the switch rooms, they'll be identifying their electricians by their teeth, so no risks can be taken.
Of course in an ideal world they'll have SOPs in place for this exact scenario so their engineering manager simply grabs the folder and runs through the motions.
In an ideal world. Which I suspect Heathrow is extremely far from.