It was Couturier's first regular-season hat trick in the NHL. He has two in the Stanley Cup Playoffs, including Game 6 of the 2018 Eastern Conference First Round against the Pittsburgh Penguins.
Oskar Lindblom had a goal and an assist, and Carter Hart made 39 saves for Philadelphia (18-23-6), which has won three of its past four games. Claude Giroux and Ivan Provorov each had two assists.
[WATCH: All Bruins at Flyers highlights]
The Flyers, who defeated the Minnesota Wild 7-4 on Monday, have won consecutive games for the first time since Dec. 18-20. It also was the second straight game Philadelphia rallied from down 2-0 in the first period.
"The win was huge, especially the way we responded going down two," Couturier said. "We're starting to show some character, some maturity."
Video: Enterprise Hat Trick: Couturier nets three vs. Bruins
Peter Cehlarik, playing his first NHL game of the season, scored two goals for Boston (26-16-5), which lost for the third time in nine games. David Pastrnak scored, and Jaroslav Halak made 15 saves.
"They finished some plays," Bruins coach Bruce Cassidy said. "When we did break down, there were good opportunities, some odd-man rushes, and it found a way in. We didn't get the same finish at the other end."
Couturier scored twice in the second period. He tipped a shot by Jakub Voracek past Halak at 5:32 to tie the game 2-2, and then tapped in a centering pass from Wayne Simmonds on the power play to put Philadelphia ahead 3-2 at 6:47.
The Bruins had three shots on goal during a five-minute power play after Flyers forward Jori Lehtera was assessed a major penalty for boarding Ryan Donato and a game misconduct with 3:12 remaining in the second period.
"It's a big swing in the game," Boston defenseman Torey Krug said. "They get a little momentum after killing it off. We've got to take better advantage of it. We did get in there, we penetrated their line a few times. It was about that next pass, and we couldn't execute."
Video: Clutch Performance: Hart stops 39 shots in win
The Flyers entered the game 28th in the NHL on the penalty kill (76.2 percent), but in the past 19 games, they've killed 47 of 57 power plays (82.4 percent).
"The biggest thing is when they enter the zone, we're not giving them any time," said Philadelphia forward Scott Laughton, who played 3:36 shorthanded. "Our defensemen are pressuring on their forwards when they're getting to pucks. Everyone's on the same page, everyone's jumping on them, and we're not letting them set up."
Couturier finished his hat trick at 15:53 of the third period. He kept the puck on a 2-on-1 and shot under Halak's left pad from the left face-off circle to make it 4-2.
"Some nights the pucks find their way in, and that last goal was more a shot-pass and found a way in the net," Couturier said.
Cehlarik, who was recalled from Providence of the American Hockey League on Tuesday, scored his second of the game with 1:06 left to make it 4-3.
Pastrnak gave the Bruins a 1-0 lead with a power-play goal at 4:39 of the first period, and Cehlarik scored from the right circle at 9:12 to make it 2-0.
Video: BOS@PHI: Pastrnak nets one-timer from knee for PPG
Lindblom scored at 12:44 to make it 2-1. Giroux had an assist on the goal for his 500th in the NHL.
"We didn't have a great first period," Flyers coach Scott Gordon said. "Wasn't just the two goals. [Hart] gave us a chance to be in the game with the saves he made."
They said it
"We had good looks on their goalie (Carter Hart), but we didn't score. They got one in the first period, and then all of a sudden, it was a 2-1 game, and then in the second period, they made some good plays on goals. I just needed to make a save on the fourth goal, and I wasn't able to." -- Bruins goalie Jaroslav Halak
"He's pretty calm back there, and it shows in the rest of the team. ... His maturity is above his age. A young guy going down early two [games] in a row, it can be tough. He responds really well and he wins the game for us. He kept us in the game all game, and you want that from your goalie." -- Flyers center Sean Couturier on Hart
Need to know
Pastrnak has eight points (four goals, four assists) in his past nine games. ... The Bruins entered the game second in the NHL on the power play (27.9 percent) but failed to score in nine minutes of man-advantage time in the second and third periods. ... Couturier has nine points (four goals, five assists) during a five-game point streak ... Lindblom's goal was his first in 31 games. ... Giroux is the second Flyers player with 500 assists, joining Bobby Clarke (852). ... Philadelphia had a season-high 30 blocked shots.
Bruins: Host the St. Louis Blues on Thursday (7 p.m. ET; SN360, SNE, SNW, SNP, NESN, FS-MW, NHL.TV)
Flyers: At the Montreal Canadiens on Saturday (7 p.m. ET; ESPN+, CBC, SNE, SNO, TVAS, NBCSP, NHL.TV)
Video: Couturier, Hart power Flyers past Bruins, 4-3