Manchester City were four minutes away from taking a one-goal lead with them into the second-leg of their Champions League play-off against Real Madrid.
But late goals from City graduate Brahim Diaz and Jude Bellingham stunned the Etihad and snatched the advantage for the defending champions.
Minutes before City's latest collapse, Erling Haaland had converted from the spot to net his second goal of the match and 49th strike in 48 European Cup games.
Kylian Mbappe profited from a fortuitous spin of his shin on the hour to level proceedings but the thrilling clash appeared to be petering out to a narrow City win once Haaland had calmly slotted from 12 yards.