The victory kept Sweden’s tournament hopes alive, but the team remains second in the Group C table behind the Americans.
Edmonton Oilers centre Patrick O’Sullivan put the United States 1-0 up 14:11 into the match, beating Sweden’s goalie Jonas Gustavsson with an unopposed shot after a breakaway.
In the second the Swedes added power to their attacks pinning the US back and went into the lead as forwards Mattias Weinhandl and Marcus Nilson, who both play in the Russian league, netted one apiece within 35 seconds.
But the Americans took the initiative back and clinched the 5-2 lead through Colorado Avalanche defender John Michael Liles, Ottawa Senators striker Ryan Shannon, who scored a double, and Los Angeles Kings defenseman Jack Johnson.
However, the Swedes refused to surrender as defender Magnus Johansson and forward Niklas Persson reduced the deficit by scoring one apiece within less than four minutes, while Weinhandl equalised at 56:19 with his second of the match.
Kristian Huselius had the Sweden fans celebrating when he scored a sudden-death winner 1:59 into overtime.
In the early Group C match Latvia overcame Austria 2-0 sending the Austrians into the relegation round of the event.