The 'Blaugrana' had dominated most of the early exchanges, but were unable to find a breakthrough. Lionel Messi and Ivan Rakitic in particular went close.
However, half-time closing in, they finally did take the lead through an unlikely source.
Ousmane Dembele was a constant thorn down the right-hand side, repaying Ernesto Valverde with a strong performance after the manager put his faith in him.
The Frenchman crossed from the byline, and Pique made a late run to get his head on the ball and send a header down into the turf.
Sergio Asenjo in goal could do nothing and a wave of relief swept around the Camp Nou - Barcelona would top the league with a win.