But Haaland had the last laugh from the penalty spot, calling it "one of the most nervous moments of my life" afterwards.
"I was nervous," Haaland told Sky Sports. "It was one of the most nervous moments of my life, but fantastic.
"A penalty in the last minute, of course I would be nervous. But amazing feeling. I love it. I have been injured for a week and it is really important to win."
City started with Haaland on the bench as Pep Guardiola eased him back into action after a recent knock, but that did not seem to matter at first as his stand-in Alvarez opened the scoring in the 17th minute with a sweet strike off the underside of the bar.
Fulham made City regret that moments later in the 26th minute when they were awarded a penalty which Pereira slotted home after Cancelo was shown a red card for bringing down Wilson.
Haaland came on for Alvarez and looked to have restored City's lead with a header from Kevin de Bruyne's cross in the 74th minute, but the striker was judged to be offside.
He made sure of City's win from the penalty spot in the fifth minute of injury time, however, after De Bruyne was tripped by Antonee Robinson.
"It was tough on us," Fulham coach Marco Silva said. "We have to understand that some mistakes can happen and we have to learn and grow from them.
"The commitment and attitude were there. We know the reality of the team we are playing against, but we have to look at ourselves and try to improve."
Information from Reuters contributed to this report.