However, the visitors were frustrated in the opening half as sixth-placed Real Sociedad showed plenty of fight against the Madrid giants in a goalless first half.
Vinicius Junior, who was handed a start by Zidane on the night, drew a foul in the penalty area early in the second half and Sergio Ramos stepped up to convert the spot kick to give Real the lead and become the highest scoring defender in La Liga history with 68 goals.
However, Ramos would leave the game with an injury shortly after following a hard collision with Sociedad's Alexander Isak, with teammate Eder Militao coming on in the 60th minute for the Madrid captain.
Karim Benzema doubled Real Madrid's lead in the 70th minute after settling a cross over the Sociedad defence, turning and firing home a goal that stood up following a VAR check for handball.
The hosts clawed one back just after the 80-minute mark when Mikel Merino found himself alone at the far post and buried his close-range attempt into the roof of the net to halve the deficit.
Zidane's team had benefitted from a Valencia goal that was chalked off for an offside against a player who had not touched the ball and there was a tangible sense of deja-vu when Adnan Januzaj's equaliser was ruled out due to Merino's position.
"We're angry with everything but mainly with the way we lost, because the little details and the big moments went against us," said Merino.
"I was at least five metres from [Thibaut] Courtois when I was flagged offside. I don't know if the same thing would have happened had it been in the other area but the flag went up and we feel that we have been wronged."
Madrid midfielder Federico Valverde, however, felt the three points were deserved.
"In my opinion we were the superior team against a very tough opponent, we knew how to cope with them and how to hold on to our lead," said the Uruguayan.
"We're so happy because it was such a hard game and when you win a game like that you should enjoy it."
Sociedad fought hard to find an equaliser, but none came as Real held on to their 2-1 lead to take all three points.
Real Madrid have beaten Barcelona and drew their other match against them, so despite an inferior goal difference Zidane's team takes top spot in the table thanks to a better head-to-head record.