Gnabry, 21, will pen a three-year deal at Bayern, with Bremen having announced earlier this week that he had triggered a release clause in his contract after just one season at the club.
The Germany international, who scored 11 goals for Bremen last season, joined the club from Arsenal in the summer of 2016.
A Bayern statement read: “FC Bayern Munich have agreed the transfer of Serge Gnabry with Werder Bremen. Gnabry, 21, will sign a three-year contract at FC Bayern.”
Excited Gnabry said: “It’s a great honour to become part of FC Bayern. It’s going to be an exciting time and one that I’m very much looking forward to,” he told Bayern’s official website.