The Frenchman had overseen two wins since stepping back into the Real hotseat following the sacking of former team-mate Santiago Solari last month.
But his 100 per cent record vanished and any momentum gained from his arrival at least halted as Real succumbed to their ninth LaLiga loss of the season.
Guedes gave Valencia – unbeaten in the league since January 5 – the lead 10 minutes before the interval with a fine strike.
That looked set to prove the difference between the sides but former Real defender Garay, who made 31 appearances for the club between 2008 and 2011, headed home seven minutes from time.
It proved pivotal for Valencia as Real striker Karim Benzema pulled one back in the third minute of time added-on – although there was no time left to try to grab a share of the spoils.
There was no room in the starting line-up for Gareth Bale, who was dropped to the bench, as was Isco, despite the midfielder scoring in the wins over Celta Vigo and Huesca.
Keylor Navas, meanwhile, was restored in goal in place of Zidane’s son Luca although the Costa Rican arguably should have done more to prevent Valencia’s opener.
Following a pedestrian opening half an hour, Valencia had a penalty appeal turned down when the video assistant referee backed up Santiago Jaime’s on-field assertion that the ball had come off Sergio Ramos’ chest and not his hand.
The hosts went ahead almost immediately afterwards, though, as Guedes collected the ball inside the area from Carlos Soler before dispatching at Navas’ near post.
Kevin Gameiro, Geoffrey Kondogbia and Rodrigo all missed the target when well-placed as Real were at sixes and sevens before the half-time whistle allowed them to regain their composure.
Navas atoned for his error by saving from Soler on the resumption while the influential Rodrigo skipped past a couple of challenges but was once again unable to find the target with his effort.
Bale and Isco were both introduced just after the hour mark in an attempt to stem the tide but it was Valencia who looked the more dangerous side going forwards.
They should have been out of sight long before Garay returned to haunt his former club in the 83rd minute, heading past Navas at the back post from Dani Parejo’s cross.
Benzema halved the deficit deep into injury time with a header from Bale’s corner but it proved too little, too late.