Hedjuk's 45th career game-winning goal beat Evgeni Nabokov and came on Joe Sakic's fourth assist of the game.
The Sharks cooled off Paul Stastny, whose rookie record scoring streak was halted at 20 games. But they couldn't slow down the Avs' charge to catch Calgary for the eighth and final playoff spot in the West.
Colorado pulled to within four points of the struggling Flames.
The Sharks looked well on their way to a franchise-record 45th win when they took a 3-1 lead on goals by Joe Thornton, Milan Michalek and Bill Guerin. Instead, they lost for the first time in eight games.