Nikita Zadorov, Mikko Rantanen and Samuel Girard scored for Colorado (28-25-12), which remained tied in points with the Minnesota Wild for the second wild card into the Stanley Cup Playoffs from the Western Conference. The Avalanche are one point behind the Dallas Stars, who hold the first wild card.
Gabriel Landeskog had three assists, and Semyon Varlamov made 36 saves for the Avalanche, who are 6-2-1 in their past nine games.
"We needed to start the game with a chip on our shoulder," Rantanen said. "And we didn't have it. We found it in the third. In the third we had urgency. If we had that in the first two it might have been a different game."
Sorensen took a pass from Brent Burns and scored from the low slot at 4:18 of the first period to give San Jose a 1-0 lead.
"He's been good for us all year," Pavelski said. "He plays hard. We're happy for him that he scored those goals."
Timo Meier made it 2-0 at 2:35 of the second period on a wrist shot from above the left circle.
The Avalanche cut the lead to 2-1 at 4:55 on Zadorov's slap shot from above the left circle.
Sorensen extended the lead to 3-1 at 19:36, knocking in a loose puck from close range for his 13th goal of the season after Tomas Hertl sent a rebound off the left post.
Rantanen scored a power-play goal at 10:08 of the third, cutting San Jose's lead to 3-2.
Pavelski made it 4-2 with a power-play goal at 12:39. He took a cross-ice pass from Kevin Labanc and scored his 36th goal on a slap shot from the left circle.
"I was hoping he was going to slide it over," Pavelski said. "It was a nice pass. The guy went down and took away a lot of the bottom half. I don't know if it went under the stick or what, but he got it over there and I had an open net."
The Avalanche made it 4-3 at 13:27 when Girard scored on a wrist shot.
"We were hungrier in the third then we were in the first 40 minutes," Avalanche coach Jared Bednar said. "In the last 20, we won more battles, won more races, all the things we needed to come up to win the game."