Gundogan skippered Premier League and European champions Manchester City during the 2022/23 campaign before leaving for La Liga.
The 32-year-old will wear the German captain's armband during Saturday's international friendly against Japan in Wolfsburg.
In the absence of goalkeeper Manuel Neuer, who fractured his right leg during a skiing accident in early December 2022, Flick had opted for Joshua Kimmich as captain for friendly matches in March and June.
"It gives a new energy, which we can use," explained Flick of the "leadership duo" he was aiming to create between Gundogan and 28-year-old Bayern midfielder Kimmich.
"I'm delighted with this vote of confidence. It's a great honour for me to guide this still young team," said Gundogan, adding he was aware of the "responsibility" that went with guiding the four-time world and three-time European champions.