The holding midfielder has opted against a move to Arsenal and will continue his career with the 2008-09 Bundesliga champion.
The 26-year-old has signed a five-year deal with the 2008-09 Bundesliga champion and will be officially presented later on Friday.
Gustavo was keen to leave Bayern after he was deemed surplus to requirements by head coach Pep Guardiola following the arrival of Thiago Alcantara from Barcelona earlier this transfer window.
He had also caught the attention of Arsenal and the Premier League giant had a 20 million euro offer accepted for Gustavo; however the midfielder has decided to stay in the Bundesliga.
Gustavo had joined Bayern from Hoffenheim in January 2011, making more than 60 Bundesliga appearances for the Allianz Arena side, where he also won the treble in 2012-13.
The Brazilian midfielder joins compatriots Naldo, Diego and Felipe Lopes at Wolfsburg.