The Pole scored a hat-trick on his Champions League debut for Barca as the Catalans beat Viktoria Plzen 5-1 last week.
He was desperately close to opening the scoring in the first half in Munich, but it was Bayern who went in front five minutes into the second half when Lucas Hernandez headed in from a corner.
Leroy Sane burst through four minutes later to make it 2-0 as Julian Nagelsmann’s Bayern made it two wins out of two in the group.
They have now won their last five meetings with Barcelona, including two in last season’s group stage and their 8-2 victory in the 2020 quarter-finals.
“I think for ‘Lewy’ it was really an emotional game to come back -- a little bit like coming home, because he was so successful here,” Bayern captain Manuel Neuer told Amazon Prime of his old teammate.
“The luck in the decisive moments wasn’t on his side -- and that became our luck.”
Barcelona next face Inter Milan, who got their first points with a 2-0 win away to Plzen in the Czech Republic.
Edin Dzeko and Denzel Dumfries got the goals for Inter while the home side had Pavel Bucha sent off in the second half.
Matip the hero
Liverpool got off to a disastrous start in Group A when they lost 4-1 to Napoli in Italy, but they bounced back from that to beat Ajax 2-1 at Anfield.
Mohamed Salah shook off a poor run of form to put Jurgen Klopp’s side ahead in the 17th minute, only for the Dutch champions to equalise before the half-hour courtesy of an emphatic finish from their thrilling Ghanaian talent Mohammed Kudus.
Liverpool were heading for a third game without a win in all competitions until Matip rose in front of the Kop to head in from a corner in the 89th minute, the ball crossing the line before it could be cleared out.
“I think everybody could see that we understood and that we had to put a completely different shift into the game. The boys did that,” Klopp told BT Sport.
“We played a lot of good stuff against a hard fighting opposition.”
That match was preceded by a minute’s silence to mark the death of Queen Elizabeth II.
The other game in Group A, between Rangers and Napoli, was postponed until Wednesday due to severe limitations on police resources in Scotland as a result of the Queen’s death.
Meanwhile Antonio Conte’s Spurs slumped to a 2-0 defeat against Sporting in Portugal in Group D, with the home side scoring both goals late on at the Jose Alvalade stadium.
It looked like the English side would escape with a point after Hugo Lloris produced a stunning late save to deny Pedro Porro.
But Paulinho headed in from the resulting 90th-minute corner, and Brazilian Arthur Gomes came off the bench to make it 2-0 with a superb solo strike in injury time.
“It was a difficult result. When you lose the game you are not happy,” admitted Conte.
Sporting top the group with six points, while Eintracht Frankfurt joined Spurs on three points thanks to a 1-0 win in Marseille, with Jesper Lindstrom scoring in the first half.
Leverkusen claimed their first points in Group B as they beat Atletico 2-0 with two late goals, Robert Andrich and Moussa Diaby both finding the net.
Belgian champions Club Brugge top the section with six points after a stunning 4-0 win at FC Porto.
Former Barcelona striker Ferran Jutgla opened the scoring with a penalty before Kamal Sowah, Andreas Skov Olsen and Norwegian teenager Antonio Nusa all netted in the second half.