Toni Kroos’ shot in the 94th minute deflected in off Carlos as Real levelled for a second time to go two points behind leaders Atletico Madrid.
Fernando put Sevilla ahead midway through the first half after slotting in from Ivan Rakitic’s knock-down.
Substitute Marco Asensio equalised for Real before Rakitic scored a penalty.
Rakitic’s spot-kick came after Eder Militao was penalised for a handball following a video assistant referee review, but only after Karim Benzema had been brought down in the penalty area at the opposite end by Sevilla goalkeeper Yassine Bounou during a frantic few minutes.
Benzema appeared to have put Real ahead after 12 minutes with a header from Alvaro Odriozola’s cross, however a VAR review found the full-back to be marginally offside.
Two points now separate Spain’s top three – with Barcelona, in third, level on points with Real – with three games remaining.
Sevilla were denied a victory that would have taken them within four points of the lead and Julen Lopetegui’s side now look out of contention, sitting six points off the pace.