The 21-year-old made his Gunners breakthrough in 2012 but after struggling to command a regular berth - and a loan spell with West Brom - joined Werder Bremen last summer.
An impressive season which yielded 11 goals from 27 appearances brought him to Bayern's attention and the two-time Germany international has now joined the Bundesliga champions.
"It is a great honour to be part of FC Bayern," he said. "Before me lies an exciting time, which I am very much looking forward to."
Bayern chairman Karl-Heinz Rummenigge added on his club's official website: "We are delighted to see another young German national player in FC Bayern in Serge Gnabry.