The Spanish giants looked in danger of humiliation after trailing 2-0 inside the first 11 minutes of Tuesday’s semi-final first leg but a stunning comeback means the tie is finely poised going into the return at the Bernabeu next week.
Real boss Ancelotti criticised his team for their slack start at the Etihad but hailed their spirit in refusing to crumble in the face of City pressure.
Meanwhile, Guardiola rued City’s failure to kill the tie off.
Ancelotti said: “It is a defeat that leaves us alive in the second leg. We have to be better in our defensive aspect, but I believe we are able to create problems for them also.
“In the second game I think if we defend better, we will win – but if we defend like today we will be out of the competition.
“My feeling is that we started really poorly in the game, we were too soft, we let in two goals and from there the team showed what they have showed in the last periods.”
Guardiola knows City could have effectively booked their place in a second successive final if they had taken a host of chances.
He said: “If we play like we did in the second half, we won’t be able to win. If we play like we did at other periods, we will.
“When I became a footballer and a manager, when you go to the Bernabeu there is no option to win. You have to come through these situations to win the Champions League.”
Kevin de Bruyne opened the scoring after two minutes and Gabriel Jesus doubled their lead in a thrilling start.
Karim Benzema pulled one back, but Phil Foden made it 3-1 early in the second half. Vinicius Junior cut City’s lead again before Bernardo Silva made it 4-2.
A late Benzema penalty then ensured Real remain very much in the tie going into the second leg.
“We were there all the time,” added Guardiola. “We were there. No complaints about the result, the performance, anything. I am so proud of the way we performed in front of the world.”