Garay, who had replaced Pepe just before half-time after the Portuguese international was stretchered off, did superbly to guide in Xabi Alonso's free-kick with seven minutes remaining to ensure Barca's win over Espanyol earlier tonight did not increase the gap between the top two for too long.
All five goals came in a thrilling second half at the Mestalla with Garay's fellow Argentinian Gonzalo Higuain celebrating a late birthday by twice putting Madrid ahead only for hosts Valencia to hit back through goals from Spain international David Villa and Joaquin Sanchez.
Real coach Manuel Pellegrini said: "We had three or four chances in the first half, and were very solid in the second. I do not know if it is our best performance of the season, but it was a very good game, against a tough rival in a tough stadium.
"I am happy that we are trying to win games from the start."
Pellegrini then discussed the fact that the team had won without Ronaldo and Kaka, continuing, "We will always miss them, because they are important players."
"No one is indispensable in this team."