Crosby gave the Penguins a 2-1 lead at 12:55 with another power-play goal, deflecting a shot from Malkin off the left post before batting it in out of the air.
"We've got to be better," Crosby said. "We've got to find a way to solve it. … Some nights, I think, maybe we're forcing things. Other nights, we make a mental mistake. It's not consistently the same thing. All those add up and end up in the back of our net. So we've got to solve it."
Karlsson tied it 2-2 at 19:53, tapping in a pass from Barabanov, and Noah Gregor put the Sharks back in front 3-2 at 4:54 of the second period with a wrist shot off a rebound.
"A lot of back-and-forth," Gregor said. "We did a good job to stay in the game all night and get the lead late there, so it was a great win."
Ryan Poehling tied it 3-3 at 14:54 with a short-handed goal. He scored five-hole with a wrist shot on a 2-on-1 for his first goal since Nov. 25 (14 games).
Barabanov responded for San Jose to make it 4-3 at 17:07 before Malkin tied it 4-4 at 10:06 of the third period.
"No one's been kicked in the gut more than us this year," Sharks coach David Quinn said. "To dust ourselves off and come in here and show up the way we did tonight, I couldn't be more proud of our group."