Valladolid took the lead on seven minutes through striker Manucho and, after Karim Benzema leveled five minutes later, Manucho scored again to give Miroslav Dukic’s side a surprise lead.
But a goal either side of half-time from Mesut Ozil was enough to give the reigning Liga champions all three points.
"We made mistakes at set-pieces,” the assistant coach told the club's official website.
“But you have bear in mind that they were momentary lapses that are correctable and more than anything we can come away confident in the team’s comeback ability, having twice made up for the two mistakes.
“We fought back in a tough and important match."
With the score 2-2 at half-time, Madrid coach Jose Mourinho made a tactical switch that ultimately paid off, with Karanka explaining the reasons behind the changes.
"We were drawing at half-time and we took off Nacho, who had played well and did what he had been asked to, but we were looking for more depth.
“We put Callejon at left-back and took off Arbeloa to put Ramos at right-back and look for more up the wing. Xabi [Alonso] also played at centre-back for a while so that we had more options to build from the back.
“When we went ahead we put Varane at wing-back, which is a more normal change, but the changes we made were all with a view to getting the win."
The 39-year-old then singled out Ozil for praise, stating his belief that his two goals would signal a return to form for the German international.
"He played well, but not only with the ball and scoring the goals, he also did what he needed to. We know very well how well he can play and he showed that throughout the match," he added.
“The work that he did without the ball during the match was spectacular. Today we saw the Mesut Ozil that we all know and that we all like to see.”