Ancelotti: High pressing earned Real victory
The UEFA Champions League title-holders need to keep winning to try and remain in the hunt for what would be their second Spanish top flight title since 2008.
The 2011-12 La Liga champions were well held by Rayo at the Estadio del Rayo Vallecano on Sunday, before second-half goals five minutes apart from Cristiano Ronaldo and James Rodriguez made the difference.
Ancelotti said Real changed tactics at the interval.
"We decided to make pressure higher in the pitch at half time," the Italian told a media conference.
"We did in the first half but not as much as I wished. The performance in the second half was great. We have played very well and I think the victory is deserved.
"I am so happy. I am really satisfied for the second half. We showed great attitude and we played great. Physically we were good too, fighting a lot and performing good. I don't ask for anything else."
Rodriguez was making his second start for Real since two months out due to a foot injury, and Ancelotti said he had no concerns playing the Colombian twice in four days.
"Each game is different and each game has its different line-up," he said.
"James could help the team as he did in his first game after the injury. So, I decided to give a chance to James.
"Anyway, each game will be different in this period of time."
Winger Gareth Bale, also under an injury cloud with a left foot problem, shook off the issue to play the majority of the encounter before being substituted.
Ancelotti said the Wales international had to get through a fitness test on Wednesday.
"Bale did pass the medical check this morning. I think he was fully recovered," Ancelotti said.
"Karim Benzema's substitution [for Isco in the 72nd minute] was due to wanting to bring on another midfielder and keep calm in terms of defensive game."