Colorado rookie Paul Stastny scored the go-ahead goal at 14:38 of the second period as the Avalanche took advantage of a lengthy two-man advantage. Sakic's shot hit Andrew Brunette and caromed to Stastny alone at the side of the net and with Miikka Kiprusoff trapped out of position. The rookie fired in his 27th goal of the season to break a 2-2 tie.
Sakic got what turned out to be the winning goal at 14:31 of the third when his team-leading 35th goal of the season from off the wing put Colorado ahead 4-2.
Daymond Langkow got Calgary back within one with a power-play goal at 17:21, but the Avalanche and goaltender Peter Budaj hung on for the victory.
Colorado pulled to within five points of the eighth place Flames in the Western Conference with each team having three games left to play. The two teams meet at the Pepsi Centre in Denver on Sunday, the last day of the regular season.
Brett Clark and Brad Richardson also scored for Colorado (42-30-7). The Avalanche are the NHL's hottest team with points in 15 of their last 16 games (13-1-2).
Jeff Friesen and Roman Hamrlik scored the other goals for Calgary (43-26-10). The Flames, the NHL's top team on home ice, lost at the Pengrowth Saddledome for just the eighth time (30-8-2).
Budaj made 18 saves and is unbeaten in regulation in his last 14 games (12-0-2).
The Avalanche tied it 2-2 at 12:02 of the second when Sakic carried the puck into the Flames zone and from the boards and centred a pass that Richardson deflected into the top corner.
Hamrlik put the Flames ahead 2-1 seven minutes into the second on a pretty set-up by former Avalanche left-winger Alex Tanguay. Jarome Iginla slipped the puck ahead to Tanguay cutting towards the goal, and Tanguay slipped the puck back into the slot where an uncovered Hamrlik charged in and blasted a one-timer past Peter Budaj.
The Flames took a 1-0 lead at 18:33 of the first period, turning a blunder by Budaj into the Flames 15th short-handed goal of the season. Budaj was unable to control a 130-foot shot on goal, and the puck bounced into the slot where Friesen raced in and one-timed a slapshot into the top corner.
Still on the power-play, Colorado drew even with 12 seconds left in the period when Clark's shot from the blue-line deflected off Friesen and squirted through Kiprusoff's pads.
Notes - Sakic's goal was his 609th of his career, moving past Dino Ciccarelli into 15th spot on the NHL's all-time goal-scoring list... Returning to the Calgary line-up was rookie LW David Moss (6 games, lower body) and D Dion Phaneuf (2 games, flu)... Prior to the game, Rhett Warrener was awarded the Ralph T. Scurfield Humanitarian award in recognition of his community service. It's the second year in a row the Flames defenceman has won the team award... Calgary RW Jarome Iginla picked up his 338th and 339th assists, moving him past Gary Suter and into third spot on the Flames all-time list. Iginla trails Theoren Fleury (460) and Al MacInnis (609).