© Getty Images
Franck Ribery then saw his goalbound shot bravely blocked by a combination of City defenders, but just seconds later the game swung in the favour of the home side.
The Argentine striker picked himself up to plant the spot kick beyond the reach of Manuel Neuer and hand the Citizens the lead.
The dismissal of Benatia opened up the game and City were content to soak up pressure from the Bundesliga champions before releasing Aguero on the break.
Lampard almost fired a well-worked free kick into the top corner from 30 yards, but the midfielder's fierce shot flew narrowly wide.
However, Alonso rolled a free kick into the bottom corner of the net five minutes before the break to bring City's momentum to a halt.
© Getty Images
Five minutes later, Lewandowski netted for Bayern with a flicked header to turn the game on its head.
Alonso almost grabbed his second moments after the break, but his curling left-footed effort bent the wrong side of Hart's far post.
At the other end, Jesus Navas drew a low save from Neuer as both sides looked to attack.
City were eager in closing down their German opponents, but Bayern were assured in possession and played their way out of many tricky situations.
Lampard continued to threaten and forced Neuer into a save at full stretch, but it looked as though Bayern were going to hold on to secure victory.
However, Aguero latched on to Alonso's mistake five minutes from time and passed a composed finish into the far corner to level up the scores.
Then he forced Jerome Boateng into a mistake and swept the ball inside the near post to hand City a dramatic win.