Carlo Ancelotti’s side slowly took control of the game and led through a Karim Benzema penalty after Casemiro was fouled just before half-time.
Valencia were angered by the decision and faded badly, allowing Vinicius Junior two simple second-half finishes.
Goncalo Guedes saw a penalty saved but headed in the rebound for Valencia, before the classy Benzema struck again.
The French striker now has 301 goals for Real and trails only Cristiano Ronaldo, Raul and Alfredo Di Stéfano in the club’s all-time list of top scorers.
“I am very proud,” Benzema said. “Scoring that number of goals in this club makes me feel very happy. For me this is the greatest club in the world. Today I thought we put in a great performance after the defeat against Getafe.”
The success means Real hold an eight-point lead at the top of La Liga from Sevilla, who have two games in hand and face Getafe on Sunday.
Ancelotti’s side are now 27 games unbeaten at home in La Liga.
Despite a spirited start from their visitors, Real began to work Jasper Cillessen regularly and he denied both Eder Militao and Marco Asensio, before Luka Modric struck the bar.
In a key moment just before the break Omar Alderete was judged to have brought Casemiro down in the box, allowing Benzema to fire a penalty high into the net. Valencia felt Casemiro had ran into the challenge and they could muster little in the way of response as they capitulated after the interval.
Vinicius profited from eight yards when Mouctar Diakhaby was unable to sort his footing out to clear and the Brazilian headed in his second from a yard when Asensio’s shot was saved.
A late Valencia rally saw Courtois serve up eye-catching saves – including from Guedes’ penalty – but Benzema closed the night out with class as he spun in the box to coolly side-foot Real’s fourth.