Jose Mourinho's men looked to be home and hosed when Cristiano Ronaldo increased their 3-0 lead from the first leg in only the eighth minute, only for a dramatic burst of second half goals from Emmanuel Eboue, Wesley Sneijder and Didier Drogba to set up a tense finale, before Ronaldo had the final word.
Real were inches away from adding to their already comprehensive advantage with only three minutes on the clock as a lightning break saw Fernando Muslera race from his line to deny Gonzalo Higuain with Angel Di Maria rolling the follow-up narrowly wide of the post.
But the Galatasaray defence was breached soon after as Mesut Ozil's precise through-ball found Sami Khedira, with the midfielder's drilled low cross turned home from close range by Ronaldo for his 47th goal in 47 games this season.
Mourinho's men were only denied a second on the night by a sensational save from Muslera in the 24th minute as Ronaldo dragged the ball back and flicked it between his legs to release Di Maria into the area, but his first-time shot with the outside of his boot was somehow tipped over the bar by the goalkeeper.
Sneijder forced Diego Lopez into a diving save seven minutes before the interval as his snap-shot from the edge of the box following a short corner flew through a forest of legs, but the Spanish giants were rarely troubled in the opening period.
Ronaldo missed a glorious opportunity to make it 2-0 on the night and 5-0 on aggregate with 57 minutes gone when he was found eight yards out by Di Maria, but got the ball tangled up in his feet and could only shuffle a shot wide of the far post.
Galatasaray finally got on the scoresheet in the tie seconds later as Eboue let fly a first-time shot with the outside of his boot from the edge of the area which arrowed beyond a static Lopez and ripped into the top corner of the net.
They should have taken the lead on the night in the 62nd minute as Sneijder was inadvertently set up by Fabio Coentrao's hashed clearance across his own box, only for the Holland international to somehow skew his shot wide with the goal at his mercy.
But the former Inter Milan man made amends in the 71st minute as he burst into the Real box to finish confidently beyond Lopez to place just an element of doubt in the minds of the Madrid players.
And Drogba then produced a stunning finish 60 seconds later, flicking the ball between his legs with his back to goal from substitute Nordin Amrabat's cross to find the bottom corner of Lopez's net with the goalkeeper again helpless.
Ronaldo smashed a rising drive narrowly over and Drogba had the ball in the net with 10 minutes to go only to be correctly given offside. Substitute Alvaro Arbeloa was dismissed for two quick-fire bookings in the closing stages before Ronaldo struck deep into added time.