Nick Foligno scored on a rebound to cut it to 6-4 at 17:55.
Pastrnak made it 6-5 at 19:45 with a wrist shot from the left dot.
"These games happen every once in a while," Pastrnak said. "It was obviously our third game in four days. We kept it positive. We came back twice.
"Hockey is a long season. It's still early and these kinds of games are going to happen. You see it around the League all the time. Just sometimes the puck goes into the net both ways."
Artem Zub scored on his own rebound at 10:07 of the third period for the 7-5 final.
"Offensively, we did all the things we wanted to do tonight, but clearly we gave up too much," Smith said. "There were a lot of nerves, you could see it on the bench. I thought we played really well in the first two games [of the season] and didn't get the results, so we'll just take the win and move on."
NOTES:Giroux played his first 14 NHL seasons with the Philadelphia Flyers, and played last season with the Flyers before being traded to the Florida Panthers on March 20, 2022....Foligno scored his first NHL goal 15 years ago on Oct. 18, 2007, as a member of the Senators in a 4-3 win against the Montreal Canadiens. Tuesday's goal was the 207th of his career. … Batherson had two assists to give him 100 in his NHL career. … Defenseman Anton Stralman had one hit, two blocked shots and was minus-2 in 18:29 of ice time in his Bruins debut after signing a one-year contract Oct. 12. He was in training camp on a professional tryout contract.