It was Barcelona's first win of the new LaLiga season, with Ansu Fati coming off the bench in the second half to take charge of the match with two assists and a goal.
Polish striker Lewandowski opened the scoring in the first minute of the game, his first LaLiga goal since moving from Bayern Munich. Alexander Isak equalised five minutes later after latching on to a pass from David Silva.
Barca struggled to break the deadlock until coach Xavi Hernandez sent on Raphinha and Ansu in the 64th minute. Ousmane Dembele scored in the 66th minute with Lewandowski adding his second two minutes later. It was then Ansu's turn in the 79th minute to nab a goal and close out the game.
Here are the main talking points, player ratings, and more from Barcelona's emphatic win.
1. Lewandowski celebrates 34th in style
Robert Lewandowski, a €45 million summer signing from Bayern Munich, opened the scoring after just 49 seconds, turning home after good work from Pedri and Alejandro Balde to register his first goal for his new club.
The two sides then traded blows in an even contest before Xavi Hernandez's substitutes swung the fixture in Barca's favour.
Dembele's goal kicked off a sensational last 25 minutes from Barca, with Lewandowski adding his second minutes later and the Polish striker then produced a brilliantly improvised pass to set up Ansu for the fourth.
2. Ansu steals show in Xavi's experimental XI
After a drab goalless draw at home to Rayo Vallecano in the opening fixture of the season, Xavi decided to experiment at Anoeta.
Youngster Balde came in for Jordi Alba to play as a left wing-back, with Ousmane Dembele on the other side, while Ferran Torres made his first start of the season in awkward midfield four with Pedri, Gavi and De Jong.
It was a glimpse of changing times at Barcelona and was the first league game since December 2020 in which none of the club's captains -- Busquets, Alba, Gerard Pique and Sergi Roberto -- had not started. It didn't quite work, though, so after an hour Xavi showed off Barca's newfound depth following heavy investment this summer.
Raphinha, a €55m signing from Leeds United, was introduced, but it was an academy graduate in Ansu who stole the show. The 19-year-old made an immediate impact, setting up goals for Dembele and Lewandowski before scoring his first of the new season in the 79th minute.
For all the money Barca have spent, their most important players, with an honourable mention for Lewandowski and Dembele, may just be two that they already had: Ansu and Pedri.
3. 'La Real' flounder after strong start
Imanol Alguacil will wonder how his side lost 4-1.
For an hour, they more than matched Barcelona, quickly recovering from conceding within the first minute to not only level but also have the better chances to lead by half-time.
La Real will take the positives, though. In Silva, Merino, Takefusa Kubo, Martin Zubimendi and Brais Mendez, they have a really productive midfield feeding the impressive Isak, who netted for the first time since April here.
Barcelona: Ter Stegen 8; Araujo 6, Christensen 7, Eric Garcia 6, Balde 7; De Jong 5, Pedri 7, Gavi 6; Dembele 7, Lewandowski 8, Torres 6
Subs: Ansu 8, Raphinha 6, Alba 6
Real Sociedad: Remiro 6; Eustondo 6, Zubeldia 6, Le Normand 6, Munoz 6; Zubimendi 6, Brais Mendez 6, Merino 7, Silva 7, Kubo 6; Isak 7
Subs: Cho 6, Turrientes 6, Navarro 6
Best and worst performers
BEST: Ansu Fati
Lewandowski's goals and Ter Stegen's saves ensured Barca picked up three points for the first time this season but without Ansu's explosive impact off the bench the Catalans may not have found a way through in the second half.
WORST: Frenkie de Jong
The Dutch midfielder had an evening to forget, losing the ball in the buildup to La Real's goal and struggling to fill in for Busquets. His first-half performance was the symptom of a disjointed Barca, though, and he improved as the game developed.
Highlights and notable moments
That's one way to celebrate a 34th birthday. Feliz cumpleaños to Lewandowski!
Robert Lewandowski's goal puts Barcelona on the board early in the game.
And the birthday boy may think about getting Ansu a present as well.
Ansu Fati increases Barcelona's lead with a goal in the 79th minute.
That's quite the comparison there...
After the match: What the managers, players said
"It was a difficult game, it always is when you come here. We play with more patience, like in the second half, we're much better. We lacked that in the first half. We spoke at the break about attacking the space better, that is what we needed to do. We deserved to win." -- Barcelona coach Xavi Hernandez
"We were basically playing with five or six forwards. It is all about risks and how many you need to take." -- Xavi on his lineup decisions
Key stats (provided by ESPN Stats & Information)
Lewandowski's goal at 46 seconds is Barcelona's fastest in all competitions since Andres Iniesta scored after 43 seconds vs. Recreativo in LaLiga on April 11, 2009.
Lewandowski did not record his first career multi-goal game with Bayern Munich until his 11th match played in 2014-15.
Ansu Fati is the 11th different teenager with a multi-assist game in LaLiga since 2010-11. He is the fourth to do it as a substitute.
Barcelona: They host a charity match friendly benefiting ASL (amyotrophic lateral sclerosis) against familiar face Pep Guardiola and Manchester City on Wednesday. they welcome Real Valladolid on Aug. 28.
Real Sociedad: They travel to Elche on Saturday.