Barabanov gave the Sharks a 1-0 lead at 4:25 of the second period, scoring from the left circle after Hertl lost control of the puck at the top of the crease. The goal was San Jose's first in 29 power plays dating to April 12.
MacKinnon scored his 20th of the season to tie it 1-1 at 13:08, skating to the right post and redirecting a pass from Conor Timmins during a 4-on-4.
"I just saw him creeping back door, so I just tried to get it to him as quick as possible," Timmins said. "Luckily we connected. Obviously, whenever we can get a big goal like that for our team it's a great feeling. It was pretty exciting."
The Avalanche took a 2-1 lead at 16:06 when J.T. Compher won a face-off in the right circle to Burakovsky, who beat Korenar glove side.
Colorado outshot San Jose 21-4 in the second period.
"[Korenar] kept us in the game," Sharks captain Logan Couture said. "He was probably our best player for a majority of the night. It could have been a lot more than the four that they got. We made it a game at the end, but I wish we would have helped him out a little more."
Nemeth increased the lead to 3-1 at 9:05 of the third period with a shot through a screen from just inside the blue line.
"Cale [Makar] made a great play, drew a guy to him, and I had an open lane and just took a shot," Nemeth said. "It was a good play by him to create some movement there."
Nemeth had a bigger role Saturday in the absence of defensemen Ryan Graves (upper body) and Samuel Girard (lower body), who were injured Friday. Nemeth had four shots and three blocks in a season-high 23:34 of ice time; he.was acquired in a trade with the Detroit Red Wings on April 9.
"Just trying to be a solid defender and a good [penalty kill] guy, making the opposition work hard," Nemeth said. "That's who I am and that's what I want to bring to this team down the stretch."
Couture cut it to 3-2 at 9:55 with a shorthanded goal, putting in the rebound after Evander Kane was stopped on a breakaway.
Rantanen made it 4-2 at 15:34 when he redirected Devon Toews' point shot. He has scored five points (two goals, three assists) in two games since returning from NHL COVID-19 protocol that caused him to miss four games.
Hertl got the Sharks to within 4-3 at 17:47 with Korenar off for an extra skater.