Los Blancos had a chance to put themselves four points clear of Barcelona at the top of the table with a game still in hand after the fixture, originally on matchday 16, was postponed due to their commitments in the World Club Cup.
Instead, they failed to capitalise on the opportunity as a Valencia side rapidly improving under interim boss Voro struck twice in the opening nine minutes and held their nerve for the rest of the game.
The hosts opened the scoring in the fourth minute when Simone Zaza, a player reborn following his dismal loan stint at West Ham United, grabbed his second strike in two games.
The Italian was about 15 yards from the Real goal, with his back turned, when he received a cross from Munir El Haddadi, setting it up with his right foot, before pirouetting and rifling a half-volley past Keylor Navas.
Just five minutes later, Valencia were two to the good as Zaza found Nani on the left-hand side before the ex-Manchester United man threaded a through-ball into the path of Fabian Orellana, who duly slotted home.
It looked like Zinedine Zidane's charges gave themselves the perfect platform upon which to mount a second-half comeback when Marcelo's cross on the stroke of half time found Cristiano Ronaldo, who slipped in between two defenders to plant a towering header past Diego Alves.
However, Voro had prepared his team exceedingly well as they held firm at the back and, despite the visitors registering 22 shots in the game, only five of these were on target.
Real became increasingly desperate in their attempts to find an equaliser as the game went on, but Alves remained comfortable for the most part as his defence remained unshakeable right until the final whistle.
The result means that Valencia climb to 14th place in the la Liga table, 10 points clear of the dropzone, while Real remain one point clear at the top of the table with one game in hand.