Real go top after Barca slip up
Sevilla stunned the home fans by taking a two-goal at the Bernabeu with an own-goal from Xabi Alonso and an Ivica Dragutinovic free-kick early in the second half.
Real stormed back, netting twice in four minutes through Cristiano Ronaldo and Sergio Ramos and the winner came when Van der Vaart scrambled the ball home in added time.
Barca twice came from behind to draw with Almeria thanks to a double strike from Lionel Messi, the second coming after Zlatan Ibrahimovic had been sent off in the 61st minute.
Real climbed into first place, level on 62 points with their arch-rivals but with a superior goal difference.
Deportivo La Coruna climbed to fifth on 41 points with a 3-1 comeback victory at home to lowly Tenerife thanks to goals from Juan Rodriguez, Andres Guardado and Diego Colotto.
The islanders have earned just two points on their travels all season and shipped 12 goals in their last three outings.
Sevilla spoiled a festive atmosphere at the Bernabeu, following the news of Barca's draw in Almeria, by grabbing an early goal when Diego Capel's cross was turned into his own net by Alonso in the 10th minute.
Real peppered the Sevilla goal but ran into an inspired Andres Palop and, against the run of play, found themselves 2-0 behind after a bizarre strike just after halftime.
Dragutinovic's speculative long-range free-kick looked harmless but goalkeeper Iker Casillas was unsighted and the ball bounced inside the post.
Ronaldo started the fightback on the hour, clipping home a loose ball from close range and, after substitute Guti crashed an effort against the bar, Ramos headed in at a corner.
Gonzalo Higuain hit the post and the bar, Raul got in the way of Ronaldo's goal-bound shot and Sevilla barely emerged from their own half.
It was the 92nd minute when Higuain headed goalwards, Palop was unable to hold the ball, and Van der Vaart slid in to score, sparking wild celebrations around the stadium.
Barcelona, who left France striker Thierry Henry on the bench again, were undone after 12 minutes in Almeria when Domingo Cisma rose to head home from a corner.
Almeria keeper Diego Alves was in fine form and as Barca's frustrations grew, coach Pep Guardiola was sent to the stands for disputing a decision.
Alves held firm until just before half time when Barca won a fortunate free-kick on the edge of the area and the keeper could only watch as Messi's superb effort curled into the top corner.
Almeria were back in front after the break when Carles Puyol turned Guilherme's low cross into his own net.
Four minutes later Barcelona's Sweden striker Ibrahimovic was sent off when Cisma made the most of a tussle between the two.
Despite the setback Barca continued to press and, when Almeria failed to clear Pedro's cross in the 66th minute, Messi hit his 19th league goal of the season from close range.
But it was far from a vintage performance by the Catalans.