The Sharks overcame a two-goal deficit with three goals in the final period to snap a three-game losing streak. The Avalanche lost for the fourth time in five games.
Daniel Winnik scored with 1:39 left in the second period and Colorado took a 4-2 advantage into the third.
The Sharks came within one goal of equaling their largest one-game total of the year, which occurred in a 6-3 victory over Phoenix to open the season.
Antti Niemi shut out the Avalanche over the final period and made 23 saves in the victory.
Semyon Varlamov allowed all five San Jose goals on 35 shots.