The league leaders were cruising after scoring three times in the opening 23 minutes, only to concede twice before half-time.
Alvaro Morata completed his hat-trick after the break to see Madrid regain complete control on their way to a 4-2 win, but the way the Liga giants let Leganes fight back annoyed Zidane.
"We made a very good start, we scored two goals and in three minutes the game changed due to the way they reacted," he told a news conference.
"It was because of a lack of concentration, but then we controlled the second half better and we must forget those two minutes, although they could have proved costly.
"At the time I got angry, I was furious. We let the opposition back into the game and that's football because you never know what can happen.
"In two minutes we made things difficult for ourselves, but we got the fourth goal early in the second half and we controlled the match. I'm not worried about that."
Morata scored a hat-trick after James Rodriguez's opener as Madrid maintained their two-point lead over Barcelona atop the table.