Michal Handzus made the first shot and two Sharks missed before Marleau shook Semyon Varlamov, sneaking the puck between the goaltender's legs for the winning score. Niemi turned aside 25 of 27 shots before the shootout and tossed aside John Mitchell's attempt to send it to a fifth round.
Logan Couture and TJ Galiardi also scored goals for the Sharks, who snapped a two-game losing streak. San Jose has won eight straight at home, including three in overtime.
Chuck Kobasew scored in the first period for the Avalanche and Mark Olver tied it with 3:16 remaining in regulation.