First time in 10 years in La Liga Barca have conquered Anoeta.
Ernesto Valverde's team came back from 2-0 on South American wings.
Paulinho, Suarez 2x and Messi were scorers for Barcelona.
Ernesto Valverde's team came back from 2-0 on South American wings.
Paulinho, Suarez 2x and Messi were scorers for Barcelona.
Willian Jose headed Real ahead and then had a goal ruled out before Juanmi's deflected strike doubled their lead.
Paulinho slid in Suarez's cross to pull one back and the striker then levelled with a magnificent looping effort.
Suarez scored again from Thomas Vermaelen's header and Lionel Messi curled in a late free-kick.
The result leaves fourth-placed defending champions Real Madrid nearer to the relegation zone than to Barcelona. It is the first time Barca have been 19 points above Real since the penultimate day of the 1990-91 season.
Barcelona had not won a La Liga game away to Real Sociedad in a decade - picking up two points from the previous seven games - and it looked like that run was going to continue after 34 minutes.
Willian Jose's bouncing header from Xabi Prieto's cross beat Marc-Andre ter Stegen and the Brazilian then had a goal harshly ruled out because of a disputed foul on Ivan Rakitic.
They deserved to double their lead when Juanmi controlled Sergio Canales' reverse pass over the top before scoring.
But Barcelona showed great mental strength to bounce back and Paulinho gave them renewed hope going into the break when he scored from Suarez's cross.
Suarez, who has rediscovered his form after a slow start to the season, scored an excellent second - when his first-time side-footed effort from the corner of the box flew over Geronimo Rulli into the back of the net.
And Messi scored a fantastic 25-yard free-kick, which left Rulli rooted to the ground, to seal the win.