After Riyad Mahrez’s goal extended City’s 4-3 first-leg victory last week, they were two goals ahead on aggregate going into the 90th minute.
Then the man currently on form, Rodrygo made his presence felt.
In the final minute, the Brazilian substitute converted Karim Benzema’s left-wing cross from close range – Real’s first chance on target.
After Marco Asensio flicked on Dani Carvajal’s cross, he leveled the tie 90 seconds later with a header into the top corner.
City, who had hoped to reach an all-English Champions League final for the second year in a row, were stunned.
Before the final whistle, both teams had chances to win the match. Rodrygo was denied a hat-trick by Ederson, and then an unidentified Phil Foden blasted over from within the box.
So the game went to extra time, and Real scored the game-winning goal in perhaps the greatest Champions League semi-final ever.
Benzema raced Ruben Dias to a loose ball in the box, but the City defender hauled him down. He took the penalty alone and converted it for his 43rd goal of the season. It is, without a doubt, the most crucial.
Thibaut Courtois of Real Madrid, who had a far busier day than City, turned away Foden’s header with Fernandinho inches away from netting the rebound – but City couldn’t find a goal to send the game to penalties.
This sets up a rematch of last year’s most memorable Champions League final when Real overcame Liverpool 3-1.
City and manager Pep Guardiola are now focused solely on winning the Premier League, where they now sit one point ahead of Liverpool with four games remaining.