Pittsburgh (41-24-11), which has at least a point in seven of its past eight games (5-1-2), is tied with the New York Islanders for second place, one point behind the Washington Capitals. Jared McCann scored two goals and Matt Murray made 29 saves.
"I am happy for our players," Penguins coach Mike Sullivan said. "They competed hard down the stretch against a good team that's playing with a level of urgency because of obvious reasons at this time of year."
WATCH: [All Penguins vs. Stars highlights]
Dallas (38-31-6), which went 1-3-1 on a five-game homestand, holds the first wild card into the Stanley Cup Playoffs from the Western Conference, two points ahead of the Colorado Avalanche. Anton Khudobin made 27 saves.
"We could be sitting in a really comfortable position if we win three of five," Stars coach Jim Montgomery said. "But we haven't done that, so we look ahead now. And we've got to go and earn it on the road. There's nothing wrong with that."
McCann gave the Penguins a 3-2 lead at 4:20 of the third period, taking a pass from Teddy Blueger before spinning around Stars forward Tyler Seguin and scoring with a backhand while shorthanded.
"At that point in the game it's a tie game," Penguins captain Sidney Crosby said. "You're thinking they could possibly get one on us, it's a power play. To be able to just try to hold them off would have been great. Then to score one's a big boost. I thought it really gave us a big lift. [McCann] was great all night, but that was a pretty unbelievable goal. A big goal in the game."
Jake Guentzel made it 1-0 at 15:25 of the first period on a power play after Phil Kessel's initial shot caromed off the leg of Stars defenseman Esa Lindell to him in the right circle.