McCabe put his team ahead with a pair of identical goals, scoring through goalmouth scrambles in the first period.
Gaudreau made it 3-0 for the Americans, beating Malcolm Subban with a low shot on a sharp counter attack at 22:58. Subban was substituted for Jordan Binnington after stopping 12 of 16 shots, and Jim Vesey extended the lead to four 10 minutes later.
United States goalie John Gibson made 33 saves for the victory.
“The defense played really well, which made my job a lot easier,” said Gibson, who made three tough saves when his team was a man down after Rattie’s goal. “If it wasn’t for them, we probably wouldn’t be here.”
The Americans finished third in their group at 2-2 in the preliminary round and routed the Czech Republic 7-0 in the quarterfinals on Wednesday.
Canada didn’t lose a game in the preliminary round and had a quarterfinal bye.
Elias Lindholm and Filip Forsberg scored in the late game as Sweden dominated the first period, but Russia pulled one goal back midway through the second period and Mikhail Grigorenko tied it at 47:56.
Neither team scored in overtime before Collberg turned out to be the lone scorer in the penalty shootout.
Niklas Lundstrom made 27 saves for the victory. Andrei Vasilevski stopped 38 shots for Russia.
Slovakia beat Latvia 5-3 in a relegation-round match.
By Douglas Holtz-Eakin
The young drop coverage to avoid higher premiums
Independent voices from the TWT Communities
Are there profound differences between the Left and the Right? You betcha.
Entertainment News and Reviews from Washington, D.C. and beyond.
A mother of three and a passionate conservative, Shirley Husar changes the game.
Benghazi: The anatomy of a scandal
Vietnam Memorial adds four names
Cinco de Mayo on the Mall
NRA kicks off annual convention
California wildfires wreak havoc