In a game arranged by means of compensation to Bayern for an injury picked up by Arjen Robben while on international duty ended in victory for the Bundesliga club while Robben made an appearance in a Holland shirt.
Toni Kroos put Bayern in front, but Klaas Jan Huntelaar and Luciano Narsingh turned the game around within minutes.
Nils Petersen brought Bayern level before half time and Mario Gomez scored the winner later on as Bayern won in front of only a half-full stadium in Munich.
Kroos gave Bayern the lead in the 17th minute with a fine 25-yard effort which struck the underside of the bar on its way in.
Their lead lasted less than a minute, though, with Huntelaar replying.
The Schalke striker and Bundesliga top goalscorer this season was put through by Dirk Kuyt and threaded the ball inside Hans-Jorg Butt's near post.
The Dutch took the lead two minutes later when Holger Badstuber pushed up and got the offside trap all wrong, allowing Narsingh a free run on goal, and he chipped the ball over Butt.
Bayern levelled in the 28th minute with Petersen heading in a cross from Ivica Olic from six yards out.
Robben came on for Holland in the 75th minute, receiving boos from parts of the 33,000 fans whenever he touched the ball.
Franck Ribery also came on for Bayern and he set up Gomez to tap in the winner in the 87th minute to give the Bavarians something to smile about at the end of a disappointing few days and an equally disappointing season.
Manchester City will try and win back the Premier League title with this new soccer jersey from Nike!
Jamaica is in need of a win against the U.S. Get the jersey of the Reggae Boyz.
Barcelona will wear this new home soccer jersey next season. They also have a new away jersey. Get them both.
The adidas Nitrocharge is the most talked about new cleat in years. It was released on May 15 and will take your pitch by storm.
The USA will wear their blue away jersey against Jamaica in their World Cup qualifier on Friday night.
Neymar's move from Santos to Barcelona is no doubt the biggest summer transfer.
England will debut their new away jersey against Brazil at the Maracana Stadium on Sunday. Get in the Gear
Support the USA national team with an official 2013 Centennial soccer jersey from Nike. Its Official.
The hoop soccer jersey is classic and cool. The USA hooped jersey is perfect for every fan. Get in the Gear.
The Nike Hypervenom is the latest cleat silo from Nike. It will change your game and is worn by the game's top players.