Micheal Ferland and Sean Monahan each had a goal and assist and Johnny Gaudreau added three assists for the Flames, who began a four-game trip with a season-high fourth straight win. Mike Smith made 33 saves.
Mikael Granlund and Jared Spurgeon scored for Minnesota, which lost for just the third time in its last 14 home games - two of which were in overtime.
After Smith stopped Ryan Suter on a breakaway, Gaudreau outraced Jason Zucker to the puck going the other way. Gaudreau waited and fed Hamilton for a one-timer.
It's the second straight game-winning goal for Hamilton. He scored with 16 seconds left Saturday as Calgary beat Anaheim 3-2.
Trailing 2-0 in the third period, Granlund got the Wild within one by beating Smith high on the glove side 7:16 into the final period. He has five goals in his past seven games.
A slap shot by Spurgeon from the right circle clanked off the far post and into the Flames' net six minutes later, further igniting a crowd that booed Minnesota off the ice after the second period.
Monahan gave Calgary a 2-0 lead in the final minutes of the middle frame as he redirected a pass from Ferland past a sprawling Alex Stalock. With his 20th goal of the season, Monahan becomes the ninth player in Flames history to reach that mark in five consecutive seasons.
Ferland finished off a 3-on-2 with Monahan and Gaudreau six minutes into the game for a 1-0 lead. It was his third goal in three games and 18th of the season, second-best on the team.
The first-line trio has scored 51 of Calgary's 116 goals this season.
NOTES: Both teams are beginning a four-games-in-six-nights stretch before their bye week. ... Wild LW Nino Niederreiter missed the game with a lower-body injury. The team said he's expected to be out until after the bye. ... Ferland has a career-high 26 points, one more than last season. His 18 goals are a career best. ... Minnesota, which entered the game with the league's best home penalty kill at 92.3 percent, was 4 for 4.
Flames: Thursday night at Tampa Bay.
Wild: Wednesday night at Chicago.
© 2018 Associated Press. All Rights Reserved. Material may not be redistributed.
ST. PAUL, Minn. (AP) - Dougie Hamilton scored 2:39 into overtime to lift the Calgary Flames over the Minnesota Wild 3-2 on Tuesday night.