Calgary's Blair Jones kept the shootout alive in the fifth round when he answered Bobby Ryan's goal, but Hagman put the Ducks back out in front five shooters later.
The former Flame skated in on net quickly and Calgary goalie Miikka Kiprusoff missed on a poke-check attempt, allowing the winger to shoot it under the crossbar for the advantage.
Ducks netminder Jonas Hiller made Hagman's tally hold up for the game-winner when he stopped Mikael Backlund's last-chance try, and Anaheim bested Calgary for the 14th straight time at home.
Ryan and Matt Beleskey scored in regulation and Hiller finished with 24 saves for the Ducks.
Kiprusoff finished with 31 saves in the loss.
Couple mistakenly served bag of cash at McDonald's drive-thru
Beyonce flaunts bikini body, Blue Ivy in vacation pics