Pep Guardiola's side had lost 4-0 away in Barcelona two weeks ago but they showed tremendous character to come from a goal down and beat the Spanish champions 3-1 at the Etihad Stadium yesterday.
The inevitable Lionel Messi put the visitors in front at the end of a stunning breakaway with his 90th Champions League goal.
However, City pounced on a Sergi Roberto mistake as Raheem Sterling set up Gundogan to equalise six minutes before half-time.
"Today is a good step. We play against a great team and we compete. Now they will realise, 'Wow, we won against the best team,'" said Guardiola.
More From This Section
Barcelona remain top of Group C and need only draw away to Celtic in their next game to progress, while City now know a win away to Borussia Moenchengladbach next time out will take them through.
In Germany, Celtic kept their hopes of at least snatching third place and a Europa League spot alive as they came from behind to draw 1-1 with Gladbach at Borussia-Park.
Lars Stindl put the hosts ahead in the first half but Moussa Dembele levelled from the spot on 76 minutes with a penalty after he had been fouled by Julian Korb, who was sent off.
Mesut Ozil scored a stunning winner as Arsenal fought back from two goals down to beat Ludogorets 3-2 in Sofia and secure their place in the last 16 for the 17th season in succession.
However, Granit Xhaka and Olivier Giroud scored to haul the Gunners back level before the break, before Ozil's fine solo effort won it two minutes from time.
The German ran through, chipped goalkeeper Milan Borjan and cut inside two defenders before slotting in from close range.
PSG, Atletico, Bayern through
Arsene Wenger's side are through from Group A with two games to spare, as are Paris Saint-Germain, who won 2-1 away to Basel in Switzerland with a dramatic late winner of their own.
Atletico still have maximum points after Antoine
Griezmann's stoppage-time goal secured a 2-1 victory over Rostov at the Vicente Calderon.
France star Griezmann had put Atletico ahead on 28 minutes but Rostov looked set to escape with a point after Iranian Sardar Azmoun equalised.
Bayern came from behind to beat PSV Eindhoven 2-1 at the Philips Stadion after Santiago Arias put the Dutch champions in front early on.
Robert Lewandowski got both goals for Bayern, the first from a penalty, and also hit the woodwork three times for Carlo Ancelotti's men.
Earlier, Napoli came back to draw 1-1 with Besiktas in Istanbul, Marek Hamsik netting after Ricardo Quaresma's penalty for the Turkish side.