The Catalans had lost their last six games against Bayern but outplayed the six-time winners at the Olympic Stadium with Robert Lewandowski also on the scoresheet.
Red-hot Robert Lewandowski and Pablo Torre struck twice each as Barcelona hammered Sevilla 5-1 to stay three points clear of Real Madrid at the top of La Liga ahead of next weekend's Clasico.
Robert Lewandowski's 26-minute hat-trick steered La Liga leaders Barcelona three points clear of Real Madrid with an emphatic 3-0 win at Alaves on Sunday
Barcelona dominated despite not being able to add to their lead and restored a four-point advantage on Real Madrid, who beat Alaves on Tuesday.
Robert Lewandowski and Raphinha struck twice each as La Liga leaders Barcelona romped to a 5-1 win at Villarreal on Sunday
Spanish giants Barcelona travel to the Principality to face AS Monaco in their UEFA Champions League opener at Stade Louis II.
In Hansi Flick's first season as manager, Barcelona are off to a flying start despite their continued financial difficulties.
Robert Lewandowski shrugged off a string of missed opportunities to earn Barcelona a 2-1 win over Athletic Bilbao on Saturday in La Liga.
Robert Lewandowski struck twice for Hansi Flick's Barcelona to deliver a battling 2-1 win at Valencia in their La Liga opener on Saturday.
Kylian Mbappe scored a penalty on his return after breaking his nose but Robert Lewandowski's reply meant France and Poland drew 1-1 in their final group game at Euro 2024.