With the Penguins trailing 2-0, Evgeni Malkin and Scott Wilson scored two quick goals to erase the deficit.
Malkin sent a wrist shot through traffic, and Sharks goalie Martin Jones, at 6:47 to cut the deficit to 2-1. Malkin has five points and two goals in five games this season.
Wilson scored 2:15 later to tie the game 2-2 by jamming a shot past Jones. It was his first goal since March 6, when he scored Pittsburgh's final goal in a 6-1 win against the New Jersey Devils.
After Sharks defenseman Marc-Edouard Vlasic was called for slashing, Patric Hornqvist scored Pittsburgh's third goal for a 3-2 lead with 5:28 remaining.
"I don't know if it would be a win the way we, quote unquote, drew it up," Penguins coach Mike Sullivan said. "I said to the guys after the second period that you can win ugly in this league. You don't get points for style at the end of the night."