Barcelona were dominant in every aspect of the game and took advantage of three mistakes by Real Madrid to score.
They took the lead in the 33rd minute after Real defender Antonio Ruediger passed across his own area to Barca's Sergio Busquets, who began a move that ended with Gavi all alone inside the box to score with a precise left-foot strike.
Lewandowski extended the lead 12 minutes later on the counter when Frenkie de Jong found Gavi, who ghosted in behind Real's defensive line.
He sprinted through the left channel before putting it on a plate for the Polish striker, who tapped into the back of the empty net.
Real Madrid, who had no shots on target in the first half, spent most of the second in panic mode, trying to avoid a bigger defeat.
Yet, once again a costly mistake allowed Barcelona to score. Substitute Dani Ceballos lost the ball in midfield and Gavi sprinted forward and crossed for Pedri to fire point-black into the empty net.
Karim Benzema scored a consolation goal for Real in added time, striking home on the rebound after Marc-Andre ter Stegen denied his first attempt.