The Swedes got off to a lively start scoring through Magnus Pääjärvi Svensson, who netted his fifth goal of the tournament, 2:56 into the match.
In the second period the Sweden still looked dominant but it was the hosts' forward
Alexander Barta, who pulled the scores level with 3:57 to go before the second
Jonas Andersson put the Swedes into the lead again 3:57 into the third period beating Endras with a sharp-angled shot between the pads.
Germany, spurred on by a 15,900 strong home crowd, went on the attack trying to level again but Sweden were in complete control.
The hosts' coach Uwe Krupp substituted Endras with the sixth field player with one minute remaining but only to allow Andersson to score his sixth goal of the event into the empty net dashing Germany's hopes to win their first worlds' medals since 1934.
Sweden's semi-final conquerors, the Czech Republic meanwhile repelled a late, desperate charge by defending champions Russia to win their first ice-hockey world championship title since 2005 thanks to a 2-1 victory also on Sunday.
Jakub Klepis and Tomas Rolinek were both on target for the Czechs, while goalkeeper Tomas Vokoun produced 35 saves to help clinch a deserved victory.
"I can't believe we did it!" said Czech forward Lukas Kaspar. "We played a great game today and it was a great win. We're a great team."
The Czechs, who won four of their five previous worlds finals, got off to a flying start scoring just 20sec into the match through Klepis, who fired in off an unguarded post from veteran Jaromir Jagr's cross.
Russia tried to pin the Czechs back but their defence remained tight, and with Vokoun untouchable in his net they almost capitalised on a couple of chances before the end of the period under the watchful gaze of the country's president, Vaclav Klaus.
Detroit Red Wings forward Pavel Datsyuk had the puck in the net for Russia just at the period-ending horn but the match referee disallowed his goal after consultation with the video replay judge.
In the second period the longstanding rivals, who played their first match at the worlds in 1954, continued trading threats and it was the Czechs who went in for the interval the happier after doubling their lead on 38:13.
Russian star Alexander Ovechkin crashed into teammate Alexander Semin, and when he bundled to the ice Czech defender Karel Rachunek picked up the puck, skated into the Russian zone and slid it to Rolinek to send home.
The referee consulted with the video judge again to ascertain whether the puck had help from the Czech forward's skate, however this time the goal was allowed.
In the third period an ever-desperate Russia stepped up a gear, rushing the Czech's net in waves only for their rivals to soak up the threat and look for the counter.
After a rash of penalties for both sides, and bad-tempered clashes, Datsyuk finally gave the Russians hope by netting a powerplay goal with just 36sec remaining but by then it was too late.
"We're obviously upset," said Russian skipper Ilya Kovalchuk, who was the competition's top points scorer with 12 from two goals and 10 assists.
"We can't accept any other place than first. We're deeply disappointed."