In the match, 17-year-old Lamine Yamal hit the woodwork for Barca and Raphinha had an effort cleared off the line before the visitors took a deserved lead, Lewandowski converting from Torre’s pass in the 20th minute.
Barcelona were 2-0 up 15 minutes later as Lewandowski acrobatically hooked in the rebound after home goalkeeper Diego Conde parried Eric Garcia’s effort following a fine Yamal cross.
But Villarreal, who had won three and drawn two of their first five La Liga games of 2024-25, pulled one back three minutes later as former Newcastle and Leicester winger Ayoze Perez swept home Pepe’s low cross with a first-time finish.
The hosts pushed for an equaliser and Yeremy Pino headed against the crossbar, before Torre restored Barca’s two-goal advantage.
Lewandowski should have scored again after the impressive Yamal was fouled by Eric Bailly but fired his penalty against the foot of the post, before Raphinha scored twice in nine minutes late on to complete the convincing win.
Barcelona are top of La Liga, four points clear of reigning champions Real Madrid, who have drawn two of their six matches.
It was the perfect response for Flick’s side after they had begun their Champions League campaign with a 2-1 loss at Monaco on Thursday, in a game where Barca had to play with 10 men for 80 minutes after Garcia’s early red card.
"It was very important that we bounced back away from home and we scored five goals and got three points," said Lewandowski.
"Everyone knows what they have to do, the older players, the younger players, we know how we need to attack and defend.
"We're looking to get the ball into the box quicker this season and that's my zone, that's where I want to have more contact with the ball."