Real was leading until five minutes from time through Cristiano Ronaldo's penalty in the Sanchez Pizjuan stadium until a stunning late turnaround.
Real captain Sergio Ramos headed an own goal before Sevilla's new signing Stevan Jovetic curled home the winner in the second minute of injury time.
Jovetic, making his league debut after signing on loan from Inter Milan, found the net from 25 meters as his new team moved to within a point of Real at the top of the table.
Real has a game in hand on both Sevilla and Barcelona, which is just two points adrift after the latest round of games.
Los Blancos had needed two late goals of their own to tie 3-3 with Sevilla in a Copa del Rey match on Thursday and extend their Spanish record run without defeat,
but this time the boot was on the other foot.
Ronaldo's well-struck penalty on 67 minutes had looked set to give Zinedine Zidane's team a crucial victory in a top-of-the-table clash -- the 12th league goal of the season for the Ballon d'Or winner.
Guardiola's City crumbles
Pep Guardiola managed Real's arch-rival Barcelona to some of its greatest triumphs, but is finding success harder to achieve in the English Premier League.
His Manchester City side suffered a humiliating 4-0 defeat at Everton earlier Sunday, the worst league defeat of Guardiola's coaching career.
City has dropped 10 points behind leader Chelsea in the title race after the latest damaging setback, the third loss in four away games.
The early season EPL leader had chances to go ahead at Goodison, and a penalty claim was ignored before Romelu Lukaku put the Toffees in front.
Fellow Belgian Kevin Mirallas quickly added to the tally just after the break, a vital goal as Guardiola later conceded, and further strikes from homegrown midfielder Tom Davies and new signing Ademola Lookman rubbed it in.
"It was awful for my players," Guardiola said.
City's Manchester neighbor United needed a late Zlatan Ibrahimovic goal, his 19th of the season, to salvage a late 1-1 draw against Liverpool in the northwest derby.
James Milner had put Liverpool ahead with a first-half penalty at Old Trafford, but United pressure paid off after the break and veteran striker Ibrahimovic was on hand to head home the equalizer.
It ended United's 12-game winning run in all competitions, but Jose Mourinho's team is still on an unbeaten 16-game run in the EPL.
Jurgen Klopp's Liverpool is still searching for its first win of 2017 and has dropped to third in the standings behind Chelsea and Tottenham Hotspur -- who both won Saturday.