Already leading 3-0 from the first-leg last week, it took Los Blancos just eight minutes to build on their advantage as Sami Khedira crossed for Cristiano Ronaldo to prod home from close range.
However, after Ronaldo had missed a gilt-edged opportunity to double his tally on the night, Galatasaray produced a remarkable comeback as Emmanuel Eboue thumped in an equali
Wesley Sneijder and Didier Drogba then added two goals in a minute to ensure a nervy final 18 minutes for Madrid.
Alvaro Arbeloa saw two quick-fire yellow cards a minute from time to ensure he will miss the first-leg of the semi-final, before Ronaldo sealed Madrid’s path into the last four with another sweet strike in stoppage time.
Madrid had been warned about the wall of noise they would face in Istanbul but just like in the first leg, they started in perfect fashion.
Angel di Maria ought to have done better when his shot towards an open goal was deflected wide after Fernando Muslera had scampered from his line to deny Gonzalo Higuain just three minutes in.
However, the visitors continued to take the game to Galatasaray in the early stages and reaped their reward just five minutes later.
Mesut Ozil was once more the creator for the Spanish champions as he slipped Khedira through on the right side of the area and his driven cross was turned in by Ronaldo for his 10th goal in just 10 Champions League appearances this season.
Ronaldo then played in Di Maria for what would have been the visitors’ second on 25 minutes had it not been for an incredible save from Muslera to turn the Argentine’s driven effort over the bar.
The hosts created hardly anything of note going forward in the first-half, but Sneijder did test Diego Lopez’s handling with a powerful drive from the edge of the area after Madrid had switched off from a short corner seven minutes before half-time.
However, the momentum of the game swung in two incidents within 60 seconds of one another just before the hour mark.
Firstly, Ronaldo uncharacteristically scuffed wide with the goal at his mercy before Eboue sent a rocket of a shot into the top corner from Sneijder’s cut-back.
Sneijder then missed a glorious chance to put the home side in front as he side-footed Fabio Coentrao’s misplaced clearance wide.
The Dutch international made no mistake with his next opportunity though as he skipped past Raphael Varane and slotted confidently past Diego Lopez with 19 minutes to go.
And a minute later the tie was truly back in the balance as Drogba brilliantly backheeled Nourredine Amrabat’s cross into the far corner.
Arbeloa was then stupidly dismissed for two yellow cards in barely a minute as he first brought down Sneijder then saw a second booking for arguing with the referee.
But Madrid’s fears were eased in stoppage time when Karim Benzema pulled the ball back for Ronaldo to drill home and cap an incredible evening’s entertainment.
In Dortmund, Germany, Borussia Dortmund scored twice in added time to seal a dramatic 3-2 quarter-final, second-leg win at home to Malaga to reach the last four of the Champions League.
With Malaga leading 2-1 in the dying stages, Dortmund’s Marco Reus gave his side a glimmer of hope with a 91st-minute equaliser, but the Spaniards would still have gone through on away goals.
In the frantic closing seconds, Reus managed to stab the ball across the Malaga goal for Brazilian centre-back Felipe Santana to toe the ball over the line for the crucial third Dortmund goal to put the Germans in the last four.
Dortmund go through 3-2 on aggregate after last Wednesday’s first leg finished goalless and are into the semifinals for the first time since 1998.
Malaga winger Joaquin had given the Spaniards an early away goal before Poland striker Robert Lewandowski’s equaliser made it 1-1 at the break.
Second-half substitute Eliseu then looked to have put Malaga in the semis in their debut season in Europe’s top club competiton with a goal eight minutes from time, before Dortmund produced two goals in two magical minutes.
It was heart-break for Manuel Pellegrini’s side after the Malaga coach had to make a round-trip to his native Chile following the death of his father in the days before the game.
Dortmund continue their run as the only unbeaten team in the competition, but the winning goal came as late as the 93rd minute at the Signal Iduna Park.
Despite the hosts’ bright start, a mistimed clearing header from Dortmund centre-back Santana gave Malaga their first chance on 25 minutes, which the Spaniards pounced on to score the early away goal the Germans had dreaded.
When the ball fell to Joaquin, the former Spain winger pulled the ball back onto his left foot, out of reach of his marker Marcel Schmelzer, and rolled his shot through the legs of Neven Subotic and past goalkeeper Roman Weidenfeller.
It meant Dortmund had to score twice, but they needed only 15 minutes to draw level as Germany star Marco Reus sublimely flicked on a pass between his legs and into the path of striker Lewandowski.
Despite the attention of three defenders, the Poland star needed no further invitation to slot in his sixth goal of the competition.
Dortmund had a nervous final few seconds of the half as an unmarked Joaquin came close to netting a second for Malaga.
Lewandowski forced Willy Caballero into a diving save early in the second half, while Weidenfeller produced an outstanding parry to keep out Joaquin’s header which looked destined for the bottom corner.
Eliseu looked to have wrapped it up, 12 minutes after coming off the bench, when he knocked Julio Baptista’s rolling, goal-bound shot past Weidenfeller from close range to leave Dortmund reeling.
But with the hosts pushing forward frantically, left-back Jesus Gamez was tackled by Santana, and the loose ball fell to Marco Reus, who stroked it in to give Dortmund hope.
And Santana was Dortmund’s 11th-hour hero when he stabbed the ball over the line in a desperate scramble after Marco Reus’s shot across goal.