Kylian Mbappe scored his 38th goal of the season as Real Madrid claimed a seventh straight La Liga victory to cut the gap to leaders Barcelona to just one point.
The French forward converted a low cross in second-half stoppage time to clinch the win after Alvaro Carreras had put the visitors ahead earlier in the second half.
Madrid had struggled to break down a disciplined Valencia outfit until Carreras bundled his way past two defenders before steering a low, right-footed effort into the net to break the deadlock 20 minutes into the second half.
Alvaro Arbeloa's side, who were without the suspended Vinicius Junior and the injured Jude Bellingham, enjoyed plenty of early possession without troubling Stole Dimitrievski in the Valencia goal.
They soon began to threaten, though, and Arda Guler had a low shot deflected wide before Dimitrievski parried a powerful Mbappe drive out of harm's way.
The Valencia keeper then produced an even better save to tip David Jimenez's first-time strike wide of the far post.
Valencia's best chance of the first half fell to the lively Arnaut Danjuma, but his left-footed drive was deflected wide by Raul Asencio, while Lucas Beltran flicked a Danjuma delivery wide of the far post early in the second period.
Beltran almost restored parity five minutes after Carreras' opener, but the forward's first-time, left-footed effort struck the outside of the post.
Mbappe's late goal secured the three points, and Real matched Barcelona's victory over Mallorca on Saturday to end the weekend as they started it, one point apart.
Valencia stay 17th but are now just one point above the bottom three – although they have played a game more than all three teams in the relegation zone.
BBC