Cristiano Ronaldo scored twice in the final four minutes as Real Madrid fought back from 3-1 down to draw 3-3 with Las Palmas, despite Gareth Bale's dismissal.
Real had Bale sent off for kicking and then pushing Jonathan Viera at 1-1 and they were trailing until Ronaldo scored with an 86th-minute penalty and an 89th-minute header.
Barca earlier beat Sporting Gijon 6-1 before their boss Luis Enrique announced he would not be in charge next season.
Real had opportunities and three times had the ball in their opponents' net, only for the strikes to be ruled out for offside.
Las Palmas' goals came from Tana, Viera and Kevin-Prince Boateng.
Barca's two-point lead was expected to last a matter of hours. However, there was no routine Real win despite the hosts taking an early lead at the Bernabeu.
Isco breached the offside trap and rolled the ball in past Javi Varas for the opening goal.
But two minutes later the visitors were level as Tana fired a sweet shot past Keylor Navas.
Real had chances to restore their lead before the interval, but they were reduced to 10 men early in the second half when Bale's temper got the better of him.
Bale repeatedly swiped at Viera as he surged away from him and the Las Palmas captain reacted with a minor push after being awarded a foul.
Wales forward Bale then placed two hands in his opponent's chest, shoving him away in front of referee David Fernandez Borbalan.
Having already received one yellow card, another followed immediately and out came the red.
Madrid's woes deepened soon afterwards when Sergio Ramos conceded a penalty. After a fine tackle on Boateng, the Real captain handed a goalbound shot from David Simon.
Viera took the resulting spot kick, sending Navas the wrong way. The goalkeeper got a foot to it, but it was not enough to prevent Las Palmas' lead being restored.
Three minutes later it was 3-1. Boateng reached a Viera pass ahead of the advancing Navas to poke it in.
Las Palmas appeared to be nearing victory, but four minutes from time Dani Castellano was penalised for handball in the area. Ronaldo stuck the spot-kick into the top corner.
Real pressed for an equaliser and Ronaldo claimed it, heading in James Rodriguez's cross following a corner.
Real are second in the standings on 56 points, one behind Barcelona who thrashed Sporting Gijon 6-1 on Wednesday, but Zinedine Zidane's side have a game in hand on their arch-rivals as they seek a first league title since 2012.