Teenager Samu Omorodion stunned Barca when he struck after just 18 seconds at the Olympic Stadium following a mistake by Ilkay Gundogan.
Samu then missed a gilt-edged chance to double the lead but the hosts hit back with a Lewandowski header in the 52nd minute and then won it when the Pole added a penalty 12 minutes from time.
Barca remain third in the table, four points adrift of leaders Girona and two behind Real Madrid.
Fourth-placed Atletico Madrid came from behind to beat Villarreal 3-1 with goals from Axel Witsel, Antoine Griezmann and Samuel Lino. Gerard Moreno had given Villarreal a 20th-minute lead at the Civitas Metropolitano.
Ayoze Perez cancelled out an Ivan Rakitic opener as Real Betis claimed a 1-1 draw in their derby at Sevilla.
Italian champions Napoli conceded a late goal to slip to a surprise 1-0 home loss to Empoli. Viktor Kovalenko scored the clincher for the visitors in stoppage time, leaving Napoli fourth in Serie A.
Inter Milan returned to the top of the table as they beat Frosinone 2-0 with goals from Federico Dimarco and Hakan Calhanoglu, the latter from the penalty spot, either side of half-time.
Fiorentina beat Bologna 2-1 to climb above their opponents in the table. Nicolas Gonzalez scored the winner from the penalty spot after 48 minutes.
The Lazio-Roma derby clash ended goalless while Ederson’s stoppage-time equaliser ensured Atalanta left Udinese with a 1-1 draw.
Bayer Leverkusen reclaimed leadership of the Bundesliga with an emphatic 4-0 win over bottom side Union Berlin.
Alejandro Grimaldo, Odilon Kossounou, Jonathan Tah and Nathan Tella were all on target for Xabi Alonso’s side, who moved back above Bayern Munich.
An early goal from Xavi Simons gave RB Leipzig a 1-0 win over Freiburg while Werder Bremem and Eintracht Frankfurt played out a 2-2 draw.
In France, struggling Lyon finally claimed their first Ligue 1 win of the season as a Jake O’Brien header gave them a 1-0 win at 10-man Rennes.
The hosts had Guela Doue sent off for a dangerous tackle after just five minutes and Lyon eventually made their numerical advantage count through Irishman O’Brien in the 67th minute.
Lille moved up to fourth with a 1-1 draw at home to Toulouse while Clermont won their basement battle with Lorient 1-0. Metz beat Nantes 3-1 and Lens edged out Marseille 1-0 with a last-minute Jonathan Gradit winner.