The reigning champions were only supposed to drop points for the second time this season before replacements Lucas Vazquez and Fede Valverde secured victory.
Luka Modric opened the scoring for the hosts before Sevilla’s Erik Lamela equalized in the second half.
Real’s class ended up sending the team six points ahead of Barcelona.
Second-placed Barça, who lost at the Bernabéu last weekend, could close the gap when they face Athletic Bilbao at Camp Nou on Sunday.
The Catalan club may have thought they could get even closer to their rivals with 10 minutes left at the Bernabéu on Saturday.
But a triple replacement by Carlo Ancelotti proved inspired and allowed the Whites to claim their 10th win in 11 La Liga games this season.
Moments after coming on, Marco Asensio started the move that debutant Vazquez made for the second.
This lifted Real Madrid players and home fans alike, with renewed confidence illustrated by Uruguayan midfielder Valverde slamming an angled shot into Sevilla goalkeeper Bono.
The visitors have had a disappointing season so far, but this was manager Jorge Sampaoli’s first defeat in his fifth game since replacing Julen Lopetegui.
It leaves Sevilla in 14th place, two points above the relegation zone.