Cristiano Ronaldo put the hosts ahead with just four minutes gone, although Fernando Llorente equalised for Juve midway through the first half.
Ronaldo struck again six minutes later - this time from the penalty spot - to put Madrid back in front.
Giorgio Chiellini was sent off just three minutes into the second half, which made it tougher for the Serie A champions to get back into the game, but Madrid were unable to capitalise on their man advantage.
Ancelotti told the post-match press conference that he was pleased with the result, but concerned about how his team's performance dropped as the game went on.
He said: "We won against a very good team and it wasn't an easy game.
"We played with the right balance, but I wasn't pleased with our second-half performance, we didn't play with enough intensity, perhaps because we were tired."
The Italian also stated that Chiellini's red card did not necessarily help his team, as it meant Juventus played more defensively in the second half.
"The game changed completely because afterwards Juve sat back and we didn't need to score any more goals, our objective was then to control the play to win the game," he said.
The coach also defended Karim Benzema, who missed an open goal in the second half and was booed off the pitch by the home fans when he was replaced by Gareth Bale.
"I asked Benzema to do a lot of defensive work, particularly on [Andrea] Pirlo, and although he didn't score, I'm happy with him," Ancelotti said.
Juventus boss Antonio Conte was in no doubt that his side's chances were harmed by referee Manuel Grafe's decision to award the penalty for a challenge by Chiellini on Sergio Ramos, and then to send off his defender.
The defeat means Juve slip two points behind Galatasaray in the race for second place and face an uphill task to qualify.
"The game was conditioned by very serious incidents," he said.
"I was a bit surprised by these decisions but I want to add that referees' decisions are part of the game, we accept it, and it's over now, but it's made getting out of the group more difficult for us."
Nonetheless, Conte insisted he was proud of his side's overall performance and their ability to stay in the game despite losing a man.
"We proved we can play with one fewer player and we had a lot of energy and got our tactics right in that situation," he said.
The defeat followed a 4-2 loss to Serie A side Fiorentina on Sunday, but Conte added: "What happened on Sunday doesn't reflect where we are as a team and neither does today's result.
"We leave here convinced that we can compete at this level.
"It's never easy to come to the Bernabeu. Madrid have players like Benzema, Ronaldo and Bale that can cause you problems, but there were two decisions that have made us wonder what might have been."