Gerard Martín, Marc Casado, Ronald Araujo and Robert Lewandowski scored a goal each in the easy home win that also takes Barca three points clear of third-placed Real Madrid, who lost 2-1 at Real Betis on Saturday while Atletico were beating Athletic Bilbao 1-0 at home.
"Very happy with the match we played," Araujo said after Sunday's victory.
"It was important to win and become leaders again. It was a great effort by the team."
Sociedad played with a man down from the 17th minute after Aritz Elustondo was sent off with a straight red card for grabbing Barcelona forward Dani Olmo to stop a breakaway.
"It was a clear red card," Sociedad coach Imanol Alguacil said. "After that, there was no game. It's already hard 11 against 11 against them, so you can imagine with a man down."
It was the sixth win in a row for Barcelona in the league, and the second loss in three matches for Sociedad, who stayed in ninth place.
Barcelona coach Hansi Flick rested some regular starters ahead of the team's Champions League match at Benfica on Wednesday in the first leg of the round of 16, but it made no difference to their efficiency.
Barca were in control from the start at their Montjuic stadium, with Martín scoring in the 25th and Casado four minutes later.
Araujo added to the lead in the 56th while Lewandowski closed the scoring in the 60th for his eighth goal in his last nine matches.
Lewandowski now has 34 goals this season in all competitions, one more than the 33 he scored in what had been his previous best season with the Catalan club in 2022-23.
Sociedad, who along with Barcelona, Madrid and Atletico are playing in the Copa del Rey semi-finals, struggled from the start and had no attempts on goal, while Barcelona had 33.
Sociedad defender Hamari Traore came into the match in the second half to mark his return to action nearly six months after having to undergo knee surgery.
Earlier on Sunday, striker Diego García scored two minutes into second-half stoppage time to give 16th-placed Leganes a 1-0 win over 14th-placed Getafe in a match between teams from the Madrid area.