Hertl scored the deciding goal on a power play with a quick wrist shot in the crease off a pass from Mark Stone.
Trevor Connelly also scored, Jack Eichel had two assists, and Adin Hill made 23 saves for the Golden Knights (10-5-2), who had lost five of six (1-3-2), including 3-2 in a shootout at the Boston Bruins on Monday.
Tommy Novak had a goal and an assist, Kaedan Korczak had two assists, and Rickard Rakell scored for the Penguins (5-8-2), who have lost three in a row (0-2-1). Arturs Silovs made 20 saves.
Hertl put Vegas ahead 1-0 on a power play at 16:36 of the first period. After a shot from Mitch Marner went between his legs in the slot, Hertl scored with a backhand on the rebound.
With the assist, Marner extended his personal point streak to 11 games (16 points; one goal, 15 assists). He missed two games on Oct. 22 and 24 to attend the birth of his son.
Novak tied it 1-1 on the first shot on goal of the third period at 1:09, spinning at the top of the crease to tap a loose puck past Hill after a point shot from Korczak deflected off Eichel's stick.
Rakell gave Pittsburgh a 2-1 lead at 9:58 with a wrist shot at the left post after Novak drove around Marner for a pass through the crease.
Connelly then scored on a breakaway, tying it 2-2 at 11:19 by going backhand to forehand for a wrist shot around Silovs' right pad.
The Penguins didn't have a shot on goal on a 5-on-3 power play that lasted 1:22 after Vegas defenseman Brayden McNabb was called for high-sticking Sidney Crosby at 16:35.