San Jose came into the contest having lost nine of its last 10 games.
Logan Couture and T.J. Galiardi scored in regulation for the Sharks. Niemi had 25 saves.
Varlamov notched 39 saves for the Avalanche, who lost their third game in a row.
Chuck Kobasew and Mark Olver scored in regulation for Colorado. Olver's backhand goal at 16:44 of the third period knotted the score 2-2.
Beautician charged with giving client fatal silicone butt injection
Duggar sisters unveil Christian dating rules in new book