Sociedad hit the crossbar in the first minute but Barca then scored three times in quick succession to all but end the match before half-an-hour at the Nou Camp.
Summer signing Neymar, whose only previous goal for Barca was in the Spanish Supercopa against Atletico Madrid, opened the scoring in the fifth minute, Messi doubled the lead three minutes later and Sergio Busquets made it 3-0 in the 23rd minute.
Sociedad pulled a second-half goal back through Alberto De la Bella and briefly threatened to make further inroads, but they could not find another breakthrough and Barca wrapped up the scoring through substitute Marc Bartra with 13 minutes left.
The win leaves Barca on 18 points from six games, but it might have been a different story had Haris Seferovic's thunderous early shot from the edge of the box found the top corner of the net rather than the smashing against the bar.
Victor Valdes would have had no chance had that been a couple of inches lower, but Barca wasted no time in capitalising on that escape as Neymar took advantage of a mix-up in the visiting defence to put the champions ahead.
Alexis Sanchez's cross from the right should have been cut out but Sociedad goalkeeper Claudio Bravo and Liassine Cadamuro seemed to expect the other to deal with it, and Neymar running in behind them had the simple task of tapping home from four yards out.
Neymar then turned provider as Barca made it 2-0, the Brazilian making a good run down the left before dinking a cross to the far post where Messi planted a diving header past Bravo.
That was Messi's 10th goal of the season in all competitions and he should really have made it 11, 15 minutes later as he contrived to hit the underside of the bar from point-blank range having just seen his audacious back-heel saved by Bravo.
Barca need not have worried though as Sociedad made a complete hash of trying to clear the danger and Busquets made them pay by intercepting a pass just outside the box and driving a low left-footed shot past Bravo.
There was no way back for Sociedad after that, and Barca might easily have added further goals at the start of the second half with Bravo being called on to deny Messi twice and also Neymar.
Sociedad, who finished fourth last season, gave themselves a glimmer of hope when De la Bella pulled a goal back from close range in the 63rd minute and then Antoine Griezmann twice tested Valdes as the visitors enjoyed a purple patch.
Barca never looked like surrendering their lead though and they wrapped up the points when Bartra made it 4-1 following a pass by Messi.