City struggled to break the visitors down for much of the first half but Zabaleta’s bulldozing run and shot, helped in by the limp hand of Paddy Kenny, put them at ease just before the break.
They were stunned, though, when Joleon Lescott's awful error allowed Djibril Cisse through for an equaliser, before Barton lost his cool and was ejected in shocking circumstances.
Despite the setback, though, QPR dumbfounded the hosts with a lethal counterattack, ending in Jamie Mackie nodding powerfully home for an unlikely lead.
City threw everything at a response, Edin Dzeko heading powerfully home from an injury-time corner before Aguero capped off a truly unbelievable revival with a dramatic 94th-minute winner.
Roberto Mancini fielded an unchanged team yet again but recalled controversial striker Mario Balotelli to the bench. QPR boss Mark Hughes brought in Cisse up front alongside Bobby Zamora in his only alteration, Akos Buszaky dropping out.
Despite the visitors’ attacking team selection they were immediately put under the cosh as City seized control of the game. With the hosts registering over 70 per cent of possession in the first 10 minutes, celebrations began in the away end as QPR fans heard that Stoke had taken the lead over Bolton.
There was a nervy moment for them, however, when Kenny fumbled a gentle cross from the City left only just out of the path of the oncoming Samir Nasri.
By and large, though, QPR were resisting with strength, Mancini’s men struggling to get past the sheer numbers of a back four and – essentially – a six-man midfield. As frustration grew, news of Wayne Rooney’s strike for United had supporters tense.
Indeed, Hughes’ side had their own sight of goal but Cisse’s free kick was solidly stopped by Joe Hart.
The home side pushed back, Silva dragging an effort wide from the edge of the area just past the half-hour, but they were severely worried when Yaya Toure began clutching his hamstring in discomfort. The Ivorian, however, insisted that he could play on.
City found the breakthrough six minutes before the break, though, as Zabaleta battled through several defenders before blasting at a slight angle towards goal. Kenny got a hand to it but only succeeded in pushing the ball over his head and into the net, the pressure on the hosts relieved.
Despite Toure admitting defeat and being replaced by Nigel de Jong, the worry was all QPR’s as Bolton’s quick-fire double at Stoke put them back in the relegation zone and needing a goal to stay up.
City came out of the blocks with urgency after the break, immediately pushing wide left and Sergio Aguero meeting the cross at close range to force a corner.
It led to nothing, though, and three minutes later the hosts’ nightmare came true. In jumping to clear an innocuous ball, Lescott’s header was weak and uncontrolled, dropping backwards perfectly into the path of Cisse, who seized on it with no hesitation and buried the equaliser emphatically.
Their elation, however, was brief. Still basking in the warmth of drawing level, QPR were clearing from defence when, off the ball, Barton was spotted by the assistant referee in a tussle with Tevez, having elbowed his opponent. Replays suggested that the Argentine had made the first contact, but the midfielder's reaction was shocking.
Furious as he was shown the red card, the out-of-control Barton viciously kicked Aguero on his way out and tried to headbutt Vincent Kompany before he could finally be removed from the pitch in a shocking moment.
QPR, desperate to cling onto the draw, were spared as Kenny helped redeem himself twice. First he reacted to block a Nasri shot with his legs before only minutes later pulling off a smart double. Originally keeping out a powerful Tevez effort, the keeper then recovered from a fumble to scramble Aguero's follow-up off the line.
Against all odds, though, the visitors extended their lead. On one of their first counterattacks of the match, substitute Armand Traore careered down the left and delivered to the far post where Mackie was there to thump a diving header against the ground and up into the net.
City, throwing caution aside, hammered on the door, Kenny reaching to push Tevez's shot over the bar. They thought they had the ball in the net when substitute Edin Dzeko met Aguero's cut-back, only for Kenny to somehow squeeze it against the side netting. Balotelli, also on, could not best the Irishman either.
They pressed and pressed but QPR were inspired in defence and not even Mancini, shrieking furiously on the touchline, seemed able to spur his side to the vital response.
That was until stoppage time, though, when Dzeko rose from City's umpteenth corner to provide hope at the last moment with an unstoppable header.
Suddenly inspired, the hosts blasted forward with desperation and sealed one of the most historic comebacks right at the death. Balotelli, prone, slipped the ball to Aguero just inside the area, and the Argentine slid into space before unerringly finishing in an astonishing end to an incredible match.