Its perfect start to the LaLiga campaign looked in danger of coming to a crashing halt as Aritz Elustondo's fine finish early on gave the hosts the lead.
Sociedad squandered three glorious opportunities on the break in quick succession just before the hour to put the game out of sight, profligacy that was duly punished by the ruthless visitors.
Luis Suarez was quickest to react to a loose ball from a goalmouth scramble to level in the 63rd minute before Ousmane Dembele's low effort took two deflections on its way into the net to secure maximum points three minutes later.
Sociedad had started brightly and was rewarded in the 12th minute when Elustondo lashed in a superb half-volley after Hector Moreno's back-post header was deflected into his path.
Barcelona struggled to get a foothold in the game after that early setback, but could have twice levelled through Gerard Pique shortly before the interval.
Barca threw Philippe Coutinho on at the break in an attempt to inject some life into its listless attack, but it was the hosts who looked most likely to score the next goal.
In a remarkable passage of play, Sociedad missed three one-on-ones in the space of four minutes. Mikel Oyarzabal flashed over after springing the offside trap, before Marc-Andre ter Stegen thwarted Theo Hernandez and Juanmi.
Those misses came back to haunt the home side almost immediately as Suarez thumped home from close range and then Dembele took advantage of poor defending from a corner to scuff home from 15 yards.
Juanmi should have snatched a late point for the hosts, but his free header sailed agonisingly wide as Barca ultimately held on for a fourth LaLiga win on the spin.
Barcelona kicks off ist UEFA Champions League campaign with the visit of PSV this week before returning to LaLiga action against Girona.
Sociedad, meanwhile, travels to Huesca for its next league fixture.