Lionel Messi’s 90th Champions League goal, a counter-attacking masterpiece complete with cool finish from Neymar’s pass, put Barcelona in control as half-time approached.
The whole emphasis of the game changed, however, six minutes before the interval when Sergi Roberto’s mistake allowed Raheem Sterling to set up Ilkay Gundogan’s simple finish.
City, seeking their first win over Barcelona at the sixth attempt, were irresistible from then on as Kevin de Bruyne’s free-kick curved past Marc-Andre ter Stegen in the 51st minute.
Andre Gomes crashed a shot against the bar as Barcelona pressed for an equaliser, but City wrapped up a landmark win against manager Pep Guardiola’s former team with 16 minutes left when De Bruyne played in Jesus Navas and, when his cross fell loose from Sergio Aguero, Gundogan was once more on the spot to score.
City will reach the knockout phase of the competition if they win on 23 November at Borussia Monchengladbach, who drew with Celtic on matchday four.