Both sides had already qualified for the knockout stages before this match and for second-placed City to overhaul defending champions Bayern and secure first position, it required them to win with a better scoreline than 3-1 – that by which the German outfit beat them at the Etihad Stadium.
It appeared an unlikely prospect before the game and a virtual impossibility soon after kick-off as Bayern ripped through a helpless-looking City defence and raced into a 2-0 lead, with Thomas Muller striking in the fifth minute and Mario Gotze in the 12th.
Three minutes later the visitors had to substitute Micah Richards for Pablo Zabaleta, and their fortunes improved considerably as the game went on.
Having steadied the ship, City hit back through David Silva in the 28th minute and they then scored two second-half goals to complete an incredible turnaround, with Aleksandar Kolarov converting a 59th-minute penalty before James Milner goaled three minutes later.
And while it was ultimately not sufficient for them to take top spot Milner believes City showed they have the qualities to progress deep into the Champions League knock-out stages.
“It says a lot about the dressing-room and the character of the players,” he said. “It was a terrible start and we gave away some sloppy goals.
“We wanted a bit of revenge after the first game (which City lost 3-1). It will give us a lot of belief. We will come up against a good team like Bayern (in the next round).”
Joe Hart, making only his second appearance in 10 games for City and one of his first jobs was to take the ball out of the net after Muller scored on five minutes.
And the goalkeeper was plucking the ball from his net soon after when his defence made a hash of trying to deal with a corner and the ball ricocheted via Mario Mandzukic’s shot to the feet of Gotze, who converted from six yards.
Silva gave the visitors hope when he got on the end of a Milner header and amazingly, Kolarov drew the sides level on 59 minutes before Milner struck for the winner, sweeping in a Navas cross.
BAYERN MUNICH: Neuer, Lahm, Boateng, Dante, Alaba, Thiago, Muller, Gotze (Javi Martinez 55), Kroos, Ribery, Mandzukic (Shaqiri 68).
MAN CITY: Hart, Richards (Zabaleta 15), Demichelis, Lescott, Kolarov, Javi Garcia, Fernandinho, Jesus Navas, Silva (Negredo 73), Milner, Dzeko (Rodwell 88).
Referee: David Fernandez Borbalan (Almeria).