Cristiano Ronaldo gave the visiting side the lead in the first half but went on to miss a penalty, and the Andalusians took full advantage by turning in a crucial equalizer.
Cristiano Ronaldo missed a penalty as Real Madrid slipped further off the pace in La Liga's title race after being held to a 1-1 draw by Malaga at La Rosaleda on Sunday.
Barcelona extended its lead over Zinedine Zidane's men to 10 points with Saturday's victory over Las Palmas, meaning Madrid, missing injured striker Karim Benzema and the suspended Raphael Varane, could ill-afford a slip-up on the south coast.