Sommer has joined the Bavarians on a two-and-a-half-year deal worth €8m.
Bayern Munich went into the market for a new goalkeeper after first choice Manuel Neuer broke his leg in a skiing accident while on holiday.
Neuer was ruled out of action for the rest of the season, leaving Sven Ulreich as Bayern's only senior goalkeeper.
Sommer has made 272 Bundesliga appearances since joining Monchengladbach from FC Basel in the summer of 2014.
Earlier this season he set a new Bundesliga record while playing for Monchengladbach against Bayern Munich by making 19 saves in a 1-1 draw.
“I’m very excited about the new challenge at FC Bayern. It’s a big, powerful club," Sommer said after agreeing terms with the Bavarian giants.
"We’ve played against each other many times – I know the enormous quality and aura of this club. I’m proud that I’m now a part of FC Bayern. We have some big challenges ahead of us. I’m hugely looking forward to starting here with my new teammates, and to everything that is to come.
"I want to thank Borussia Mönchengladbach for eight and a half wonderful years and for enabling this transfer.”
Bayern CEO Oliver Kahn added: “Yann Sommer will be a valuable addition for us, because he has a wealth of international experience and has already played in the Bundesliga for many years."
"He has everything required to contribute immediately to our success. We’re certain we can achieve our goals with Yann Sommer.”
Sommer has won 80 caps for the Switzerland national team.