The 13-time European champions trailed 1-0 on the night and 5-3 on aggregate in the last-four tie entering the 90th minute, but Rodrygo scored a late double and Karim Benzema's extra-time penalty sent them through.
Real had also come from behind to beat Paris Saint-Germain in the last 16 and Chelsea in the quarter-finals.
"I cannot say we are used to living this kind if life, but what happened tonight it happened against Chelsea and also against PSG," Ancelotti told BT Sport after becoming the first coach in history to reach five finals in the competition.
"If you have to say why, it is the history of this club that helps us to keep going when it seems that we are gone.
"The game was close to finished and we managed to find the last energy we had."