Logan Couture, Brent Burns and Matt Nieto scored for San Jose (8-10-3), which has lost four of five. Martin Jones was pulled 2:16 into the second period after allowing three goals on eight shots. Devan Dubnyk made 17 saves in relief.
Sharks forward Kevin Labanc tied it 4-4 with 1:07 remaining in the third period after Dansk misplayed the puck with his stick.
"Tonight's a team that put their heads down, worked hard, battled through adversity … and just kept fighting," Sharks coach Bob Boughner said. "We found a way to get a point and, in the midst of all that, I thought we stuck together and played a real hard game."
Reilly Smith scored his first goal since Feb. 7 at 5:48 of the first period to give the Golden Knights a 1-0 lead.
Chandler Stephenson scored for the second consecutive game, 1:15 later, to make it 2-0.
Pacioretty scored his first goal on the road this season at 2:57 of the second period to increase the lead to 3-0.
"They're a team where they don't need a lot of chances, but that's the best team in the West," Boughner said. "We battled them toe-to-toe."
Burns scored on the power play at 6:01 of the second period to make it 3-1 with a shot over Dansk's shoulder. Play continued until the NHL Situation Room alerted off-ice officials that Burns' shot crossed the goal line. The clock was reset from 6:25.
Nieto cut it to 3-2 at 12:43, scoring stick side on a 2-on-1.
Alex Tuch scored 26 seconds into the third period, his sixth goal in six games, to make it 4-2 before Couture made it 4-3 at 6:23.
"I was proud of how we played. I thought we battled," Couture said. "Everyone I thought played well, we played hard. Unfortunately, we didn't get two (points), but happy we were able to get one."