The Finns, who won their first title in 1995, fell behind in the second period after Edmonton Oiler forward Magnus Paajarvi's rising shot soared into the top corner of the net to give Sweden a 1-0 lead.
But Finland's Jarkko Immonen's slapshot tied the game with just seven seconds to go in the period when he scored his tournament-leading ninth goal while Sweden's David Petrasek was in the penalty box for hooking.
"That was huge," Finnish defenseman Lasse Kukkonen said. "Sweden know how to play when they have a lead."
The Swedes had chances but could not get another puck past Finland goalkeeper Petri Vehanen whose team broke the game open early in the third period with two quickfire goals.
Before the game Sweden's goalie Viktor Fasth -- named the tournament's most valuable player -- had only given up six goals in six games in leading his team to the finals.
But the floodgates opened when Petteri Nokelainen one-timed the puck into the goal after a pass from Antti Pihlstrom on a three-on-one breakaway. Less than a minute later, Niko Kapanen stretched the lead to two goals.
Janne Pesonen and Myko Pyorala notched a goal each in less than a minute before Finnish forward Pihlstrom rounded out the scoring with 55 seconds remaining.
"I can't really explain it," Sweden forward Robert Nilsson said. "We made a couple of mistakes and they scored. Fasth has been the best player on our team in the tournament."
The teams were two of the youngest in the tournament and lacked the kind of big name NHL players on other teams such as early tournament favourites Russia and Canada.
Earlier in the evening, the Czechs won the bronze medal with a 7-4 victory over Russia in a fast-paced, entertaining game in a rematch of last year's final. It was the second time the Czechs beat the Russians in this year's tournament.
Roman Cervenka scored a hat trick to lead the way in a game in which Russia outshot the Czechs 43-28 but could not live up to their promise despite a roster including the National Hockey League's Alexander Ovechkin and Ilya Kovalchuk.
- Related links