The Brazilian midfielder had been heavily linked with Arsenal but will instead stay in the Bundesliga and join a side that missed out on the European places last season after only finishing 11th.
He will be presented by Wolfsburg later on Friday.
Gustavo was a key squad player for Bayern last season as they won the treble of Bundesliga title, German Cup and Champions League.
He started 16 Bundesliga games and three more in the Champions League and came off the bench against Borussia Dortmund in the final of that competition at Wembley.
However, with Mario Gotze and Thiago Alcantara arriving in Bavaria this summer, he is set to spend even more time on the bench this season, which could potentially cost him a place at the World Cup.
Gustavo has won 10 caps for Brazil and was a key member of the side that won the Confederations Cup this summer.
Wolfsburg, who have spent much of the last few seasons in the lower half of the table after winning the 2009 Bundesliga title, were eager to bolster their midfield in order to claim a higher finish this season.
They lost their season opener to Hanover 96 last week. They take on Schalke 04 on Saturday.
Arsenal have been linked with a number of players this season, and the potential signing of Gustavo seemed to be welcomed by fans, but so far the club have only signed France Under-21 forward Yaya Sanogo, and that was on a free transfer from Auxerre.
They could also start the season short in midfield with Mikel Areteta likely out for up to six weeks with a thigh injury.
- Sports & Recreation
- Borussia Dortmund