Barcelona missed the opportunity to top the La Liga table as they suffered a shock home defeat to Granada last night.
Lionel Messi combined with Antoine Griezmann to given the hosts the lead with a classical finish.
Barcelona missed several chances to add to their lead before Darwin Machis scored the equaliser in the second half.
Substitute Jorge Molina then headed in the winner for the visitors late on.
Victory would have put Barcelona one point clear at the top of the table with five games to go but instead they stay third, two points behind leaders Atletico Madrid and level with Real Madrid.
Barcelona and Atletico Madrid meet in what looks set to be a title decider in the La Liga title race on Saturday, 8 May.