Vancouver Canucks center Henrik Sedin collected two goals and an assist, while goalkeeper Jhonas Enroth made 26 saves to avenge a 3-2 defeat in the preliminary round.
The win has also ended the home-ice curse that prevented the championships’ hosts from winning the title on their home ice since the Soviet team did it in 1986.
Switzerland’s silver was the team’s first medal at the world championships after a 60-year wait.
“It’s terrific to be world champions,” New Jersey Devils defender Henrik Tallinder said. “It’s especially great to win the title in front of our home crowd.”
“We started the event unimpressively but managed to improve our performance day by day to finish on top.”
The Swiss took the lead at 4:45 through Nashville Predators rear guard Roman Josi, who sent the puck in with a close-range backhand shot.
Philadelphia Flyers blueliner Erik Gustafsson pulled Sweden level four minutes later sending home a rebound after Fredrik Pettersson’s powerful slap shot.
Henrik Sedin lifted Sweden 2-1 up at 11:38 with a powerplay goal sending the puck into unguarded net on his twin brother Daniel’s feeding pass.
Simon Hjalmarsson scored Sweden’s third goal 7:13 into the third period sweeping home a rebound after a mixup in the Swiss defence.
Dallas Stars left wing Loui Eriksson made it 4-1 at 55:37, while Henrik Sedin rounded off the scoring with his shorthanded empty net goal with 3:24 to go.
“We started well and scored,” said Swiss defender Severin Blindenbacher.
“Things went our way early in the match but we collected too many penalties in the first period and allowed them to grab control and win the game.”
The United States won bronze after beating co-hosts Finland 3-2 in a penalty shootout.
Montreal Canadiens center Alex Galchenyuk scored the winning penalty as the US won their first world championship medal since a bronze in Prague in 2004.
The United States got off to a flying start through Craig Smith, who sent the puck home after just 58 seconds.
US captain Paul Stastny added his goal with 4:02 left in the first period, firing home on a powerplay.
But in the third Finland levelled courtesy of a double by Phoenix Coyotes left wing Lauri Korpikoski.
After a goalless overtime the match went to a penalty shootout where Galchenyuk scored the deciding penalty.
“I’m really proud of my players, who clinched this very important win for our country,” US manager Joe Sacco said.
“But the most impressive thing for me was how quick the group of young players became the real team.”
“We started the match really well. But after we went 2-0 up the Finns put pressure on us and levelled. Luckily, our goaltending today was really good, especially in the shootout.”