The 25-year-old, who had a year remaining on his Dortmund contract, is the club’s first signing since they confirmed Spanish coach Pep Guardiola would take over at Eastlands from Manuel Pellegrini prior to the start of next season.
The midfielder was part of Klopp’s Dortmund side that won a domestic double in Germany in the 2011-12 season and reached the Champions League final in 2013, where they lost to Bundesliga rivals Bayern Munich.
Gundogan says: “I’m thrilled to have signed for Manchester City.
“The opportunity to work with a coach like Pep Guardiola is something I am really looking forward to and I am flattered to be the first signing.
The injury-prone German international dislocated a kneecap in training in May, ruling him out of the 2016 European Championships in France.
Gundogan, who also missed the 2014 World Cup with a back injury, made more than 150 appearances in five years at Dortmund after being recruited by Jurgen Klopp, who is now in charge of Liverpool.