Spanish teenage sensation Ansu Fati, who has been struggling to recover after a series of knee surgeries in the last two years, came off the bench in the second half and took charge of the proceedings with two assists and a goal.
Poland striker Lewandowski opened the scoring in the first minute of the game, rifling in a shot after a great pass from Alejandro Balde inside the penalty area.
But Alexander Isak equalised five minutes later after latching onto a pass from David Silva.
Barca struggled to break the deadlock until coach Xavi sent on Raphinha and Fati in the 64th minute, with both proving crucial to Barca's success.
First, Fati assisted Ousmane Dembele with a brilliant heel pass after a fine piece of individual play from Raphinha.
Than Fati finished a beautiful team effort to assist Lewandowski to the third.
The Polish striker returned the favour 10 minutes later, enabling 19-year-old Fati to score Barca's fourth to wrap up the points.