The Bruins outshot the Red Wings 25-10 through two periods, including 17-5 in the second.
"It's a night where you want to come away with a win," Bruins forward Taylor Hall said. "Those are games in the schedule that when you play like that, you want to come away with points, and obviously that's something we've got to do better at. I feel like on the majority of nights during the season, we control play and haven't had the record that we want."
Pastrnak tied it 1-1 at 6:20 of the third on a 5-on-3 power play with a one-timer from the high slot.
Staal scored his first of the season at 11:33 during a delayed penalty to give the Red Wings a 2-1 lead. Vladislav Namestnikov's wrist shot from the top of the left face-off circle deflected off Bruins defenseman Mike Reilly in front of the crease, and Staal put in the rebound.
"[Staal] is a rock. He's a guy we lean on for consistency," Red Wings captain Dylan Larkin said. "He's a great locker-room guy. I know the guys have a ton of respect for him and the way he plays the game. It's great to see him get one. [It was] a huge goal for our hockey team."
NOTES: The Red Wings became the fourth NHL team with 3,000 regular-season wins, joining the Montreal Canadiens (3,479), Bruins (3,252) and Toronto Maple Leafs (3,016). … Bruins forward Jake DeBrusk had one shot and one hit in 10:25 of ice time after he was a healthy scratch Sunday. General manager Don Sweeney confirmed Tuesday that DeBrusk has requested a trade. … Referee Marc Joanette left the game with an injury and was helped off the ice at 10:31 of the second period after he was inadvertently tripped by Boston defenseman Jakub Zboril.