Bayern Munich came from behind to beat Stuttgart 4-2 and win the German Bundesliga title for the 35th time.