The first half saw Thibaut Courtois save well from Gabriel Jesus, while Vinicius Jr. spurned Madrid's best opportunity, slipping when City goalkeeper Ederson palmed Karim Benzema's header straight to him.
Isco opened the scoring after the break when Vinicius picked him out inside the box, but Gabriel Jesus equalised before Kevin De Bruyne converted a penalty when Raheem Sterling was fouled by Dani Carvajal, and Ramos received a late red card for a foul on Jesus.
In the biggest games this season -- the Madrid derby, El Clasico and here -- Zinedine Zidane has favoured a conservative, safety-first approach. It has given Real Madrid defensive solidity and earned them clean sheets, even if it has meant sacrificing attacking potency. Zidane followed a similar script here and for the most part, it worked, except for 10 crazy and decisive second half minutes. Courtois' goal was hardly threatened before that, even as Madrid offered little going forward.
One plus was the performance of Vinicius, who justified his surprise inclusion by creating the game's opening goal, even if he remains inconsistent in the final third.
That second half spell when everything fell apart could end up costing Real Madrid very dearly. Conceding once was bad news, but a second was potentially terminal to their chances of progressing in this competition. The sending off of Ramos means Madrid will be without their captain and figurehead in Manchester, where they will need keep it tight at the back while grabbing at least two away goals.
Before all that the game had a cagey feel as both teams began slowly, as if sizing each other up. That nervousness was passed onto the crowd in a game and occasion that didn't live up to its billing until the madcap latter stages.
Manager rating out of 10
6 -- This was Zidane's first time facing Pep Guardiola -- a coach he has repeatedly said is the best in the world -- in a competitive game. At stake was Zidane's enviable record of never having lost a Champions League knockout tie. Both coaches sprung surprises, and Zidane made three changes from the team that lost 1-0 at Levante. Ferland Mendy replaced Marcelo at left-back, Fede Valverde came in for Toni Kroos, while Vinicius was picked on the left, filling in for the injured Eden Hazard. There was nothing fundamentally wrong with the set up, although the absence of Kroos raised eyebrows. When City scored twice, Zidane tried to change things, but it was too late.
Player ratings (1-10; 10 = best. Players introduced after 70 minutes get no rating)
GK Thibaut Courtois, 7 - Was not to blame for either of City's goals. Exudes an air of confidence and authority now and made a strong save 20 minutes in from Jesus. Got fingertips to the Brazilian's header for the equaliser, but couldn't keep it out, and was then sent the wrong way by De Bruyne from the penalty spot for City's second.
DF Dani Carvajal, 6 - Started well, getting a crucial block in inside the first minute. Was up against the pacey, deceptively strong Jesus playing on the left for City and had a difficult time of it. Fouled Sterling for the penalty converted by De Bruyne.
DF Sergio Ramos, 6 - Will miss the second leg after his red card on a night he became the player to have featured in the most Champions League games as a starter, never having been a substitute. As always, Ramos was involved at both ends. Had to deal with De Bruyne playing as a false No. 9 and still found time to appear in the City box in the second half to see a shot deflected just over. Beaten to the ball for City's equaliser, and rightly sent off with five minutes left for pulling back Jesus when through on goal.
DF Raphael Varane, 6 - Did well in the first half, using his pace to snuff out the threat of Jesus. Stepped up to shoot from outside the box in the first half, putting it well over. Varane will need to step up in the second leg in Ramos' absence.
DF Ferland Mendy, 7 - Consistently preferred to Marcelo at left-back in Real Madrid's biggest games this season and it would be no surprise at all to see Mendy start El Clasico on Sunday too. Did well against Kyle Walker when he got forward.
MF Casemiro, 6 - Cleared off the line just before half-time to keep the game at 0-0. Otherwise a somewhat anonymous performance.
MF Luka Modric, 6 - This wasn't Modric's best night, and this is proving to be an inconsistent season for the Croatian as he comes in and out of the team. Yellow carded for a challenge on Riyad Mahrez in the second half.
MF Fede Valverde, 6 - After a quiet first half, the Uruguayan got forward more in the second on the right hand side as Isco moved infield. Almost found Benzema with one whipped cross in behind. Seems more comfortable in a midfield four than a midfield three.
MF Isco, 7 - Nominally positioned on the right of the attack, he had the freedom to float across the final third. Scored the opening goal, a relatively straightforward finish in space, his first Champions League goal since September 2018.
FW Vinicius Jr, 8 - Excites, frustrates and delights the Bernabeu crowd in equal measure. This was only the Brazilian teenager's second Champions League start this season. Injects pace into the Real Madrid attack, a quality that is otherwise lacking. Played wide on the left, often hugging the touchline to stretch the game as teammates looked to play him the ball across to him early. Did really well to beat Walker to the ball and then pick out Isco for the opening goal.
FW Karim Benzema, 6 - Went into this game having scored just two goals in his previous 12 games, and rarely threatened goal. Had a header saved well by Ederson in Madrid's best chance of the first half.
FW Gareth Bale, NR -- Came on for Vinicius with 15 minutes to go as Madrid led 1-0, only for the game to slip away after that.
FW Lucas Vazquez, NR -- Replaced Modric late in the game at 2-1 down.
FW Luka Jovic, NR -- Came on for Isco as Zidane looked for an equaliser, but couldn't make an impact.