Inigo Martinez’s late header threw La Liga’s title race even further open as leaders Atletico Madrid lost at Athletic Bilbao.
Alex Berenguer scored early for the hosts but Stefan Savic looked to have rescued a point until Martinez struck.
Atletico remain two points above both Real Madrid and Barcelona, with Sevilla a point further back in fourth.
But Barca, winners earlier on Sunday at Villarreal, have a game in hand and can go top by beating Granada on Thursday.
They could have fallen further behind after Berenguer headed home Ander Capa’s cross but Jan Oblak foiled Asier Villalibre’s shot and Oihan Sancet wasted two good openings.
Atletico improved after the break, Marcos Llorente drilling just wide from 20 yards before Savic glanced home a corner to equalise – but Martinez powered home a set-piece header to win it.