Barrie scored 33 seconds into the extra session, allowing the Avalanche to improve to 4-1-1 on their season-long, seven-game homestand.
Colorado scored the first two goals of the game and then had to make a dramatic comeback as time was running down in the third period.
Jamie McGinn and Jan Hejda gave the Avalanche a 2-0 lead before the game was five minutes old, but by the end of the second period Ottawa had the lead on goals by Clarke MacArthur, Jason Spezza and Kyle Turris.
Stastny delivered the only goal of the third period. Gabriel Landeskog assisted on three of the four Colorado goals, including the game-winner.