A fast start at the Consol Energy Center helped the Sharks pull back to a 3-2 series deficit on Thursday.
There were five goals in the first period in Pittsburgh as Brent Burns and Logan Couture, who also finished with two assists, struck in the opening three minutes.
However, the Sharks' lead disappeared quickly.
Evgeni Malkin and Carl Hagelin netted for the Penguins, who were looking for a win to seal their fourth championship.
But Melker Karlsson restored the Sharks' lead 14 minutes, 47 seconds into the opening period.
Victory was sealed by Joe Pavelski, who scored into an open net with 80 seconds remaining.
Martin Jones produced a huge performance for the Sharks, making 44 saves, while Matt Murray stopped 18 shots for the Penguins.
Game six of the series is in San Jose on Sunday.