Missed chances by Robert Lewandowski on his return to Bayern Munich proved costly as his Barcelona side lost in Germany.
Barcelona outplayed their opponent in the first half, but Bayern blew their Spanish opponents away after the break with goals from Lucas Hernandez and Leroy Sane.
Two quick fire goals was all that was needed for the Bayern side to take the lead. Hernandez headed in at the near post after 50 minutes, before Sane clipped home to seal the win shortly after.
Lewandowski spurned a number of clear openings in an entertaining match.
The victory puts Bayern Munich in control of Group C with six points from two games.
Barcelona are level on three points with Inter Milan, who beat Viktoria Plzen 2-0 in the Czech Republic through goals from Edin Dzeko and Denzel Dumfries.