Eder Militao's first half own goal handed Barcelona the initiative going into the second leg at the Camp Nou on April 5.
Real Madrid dominated possession for large spells of the game but failed to record a shot on target.
Barcelona recorded less than 50 percent possession for only the third time since the start of last year.
"The team played well," Ancelotti told reporters.
"Barcelona played like they didn't want to play.
"We haven't been good in the last third. Defeat hurts, but if we do the same in the second leg, we have a chance to progress.
"We played the game we have to play: pressing, playing with intensity. We lacked a goal, but they did nothing to score. They were lucky with a rebound. We have 90 minutes [to turn it around]."
He added: "We've failed, but we did not deserve to lose. But in 90 minutes we can score a goal in Barcelona."
"It's a very bad result, undeserved, but it was a game well done on our part, with intensity and commitment.
"We didn't let Barca play the way they want. They had a very low block, not because they wanted to, but because we made them do it.
"It was difficult to have opportunities, we tried from outside the box, but they have great defenders and they gave us problems in the crosses.
"It was difficult to find spaces. They were very closed off. I have nothing to reproach. I am very happy and I am very excited to do the same in the second leg.
"They have an advantage, but we have all the confidence in the world to be able [to turn it around]."