The win earns the hosts a spot in tomorrow night's gold-medal game with arch-rivals United States.
Julien Gauthier had two goals for Canada while Anthony Cirelli and Dylan Strome each had a goal and an assist.
"We had a game plan and we stuck to it: getting in on the forecheck, playing physical, not giving them too much time to move, because they’re a skilled team," Cirelli said.
"We just played harder," Gauthier added. "We’ve done a lot of things differently. I think we have better chemistry between all the guys, and that’s why we’re here."
Goalie Carter Hart was perfect in relief of Connor Ingram who struggled and was replaced after giving up two early goals on three shots.
Canada outshot the Swedes 43-31 in a hard-hitting, sometimes chippy game that was the most emotional both sides have played all tournament.
"We had a great start," said coach Tomas Monten, "but we had several chances for a third goal and didn't get it. Our speed and skill weren't good enough to get away from their forecheck."
"We played Canadian hockey tonight," offered coach Dominique Ducharme. "We used our speed to take away their space and time, and we played a physical game."
Fans were treated to a wild first period punctuated by several great scoring chances, four goals, one goalie change, and plenty of big-time hits.
The Swedes opened the scoring at 6:05 when captain Joel Eriksson Ek beat Ingram with a long shot. It was the kind of shot a goalie must stop every time.
Less than two minutes later, though, the fired-up Canadians tied the game thanks to some nice work by Cirelli. He got a loose puck behind the net and tried a wraparound. Goalie Felix Sandstrom blocked the shot but the puck bounced over defenceman Gabriel Carlsson’s stick and Mitchell Stephens banged it in.
We weren’t done yet. Carl Grundstrom came in on goal on a partial breakaway and fanned on his shot, but it still dribbled through Ingram’s pads. Coach Ducharme had no choice but to insert Hart.
Hart was perfect the rest of the period, but the Swedes missed the net on some nice chances or drilled a few other good chances into Hart’s body for easy saves. Nonetheless, it was a steadying influence.
Cirelli tied the game at 18:49 when his hard shot beat Sandstrom over the shoulder, another goal that had a bit of an odour to it.
The tide began to turn midway through the second period. Quickly Canada upped the tempo and the Swedes couldn’t respond. Then wave after wave of Canadians forechecked, attacked, created scoring chances.
Cirelli rang a shot off the crossbar, and moments later Canada finally got the well-deserved go-ahead goal. Gauthier jammed a puck in at 12:02, and Canada continued its attack.
Sandstrom deserves full credit for keeping the score close. He made two unbelievable saves off Tyson Jost on the back side, first with a pad, then with the glove.
Sweden’s only decent chance came late when Hart flubbed a shot that trickled to the goal line.
"It was a rolling puck, so I went to catch it, and it bounced out of my glove," Hart said. "I saw it pop up, and I reached back and got my glove on it. Luckily it didn’t go in."
Captain Dylan Strome made it 4-2 at 7:38 of the third while teams were four-on-four. His screen shot fooled Sandstrom.
Gauthier closed out the scoring with an empty netter with 1:58 remaining.