Kroos curled in a superb strike from an indirect free kick to grab the three points for the four-times world champions who are now level with Sweden in Group F on three points and behind Mexico who have six.
Marco Reus equalised in the 48th minute, meeting a low cross from Timo Werner, and despite having Jerome Boateng sent off in the 82nd minute, Germany kept going and Kroos earned them a famous win.
The Swedes played with fire as the Germans racked up the chances in the opening minutes, but having weathered that storm they gradually began to threaten on the break, and Marcus Berg was denied a good shout for a penalty when he appeared to be bundled over by Boateng.
With Germany getting in behind Sweden’s full backs at will and fizzing passes across the box, it looked like it might be only a matter of time before they scored, but Toivonen’s goal gave Sweden breathing space.
Manuel Neuer saved the Germans from being 2-0 down at halftime, diving acrobatically to deflect Berg’s header from Sebastian Larsson’s stoppage-time free kick.
Reus got Germany back in the game early in the second half as the Germans launched a massive offensive and when Boateng was sent off for his second yellow card eight minutes from time the Germans continued to push on.