An own goal from Jordi Alba and a strike from Maxi Gomez delivered the three points for Albert Celades’ men.
They were by far the better side and should have been ahead in the first half, only for Gomez to see his penalty saved by Marc-Andre ter Stegen.
The German denied the forward with another strike from distance, turning his effort on to the post before saving from Kevin Gameiro.
Barcelona tried to up the ante and Lionel Messi had a few openings at goal, but was unable to respond, placing two efforts wide of the target.
It was a high-quality display from the hosts, while Quique Setien tastes defeat for the first time in the Barca dugout.