Vinny Lecavalier scored two goals - including one late in regulation that somehow overshadowed his 400th career tally - but Boston rookie Reilly Smith won it in the fifth round of the shootout, which had been tied, 1-1.
The Bruins set franchise records for consecutive road wins (nine) and consecutive road games with a point (16). They are on a 15-0-1 run overall, and have a league-high 110 points.
The Flyers dominated the last 25 minutes, holding a 25-7 shots edge against a team that looked tired after playing the previous afternoon against Washington.
It was a much different game from the Flyers' 6-1 loss to the visiting Bruins on Jan. 25.
"They had an attitude today that they were going to show themselves [they were better than that] - and I thought they did," said coach Craig Berube, whose team has another tough challenge Tuesday in St. Louis. "I know the outcome wasn't what we wanted, but we attacked and had a lot of pucks at the net. We competed hard, and you have to compete real hard against that team or you'll get in trouble."
With Mason pulled for an extra attacker, Lecavalier tied the game at 3 by scoring with 24.1 seconds remaining in regulation, taking a pass from Jake Voracek and knocking the puck into a virtually empty net.
The Bruins missed on three chances to clear the puck before it went to Voracek at the left of the goal. Tuukka Rask finished with 49 saves for the Bruins.
The Flyers managed just one weak shot during a disorganized five-on-three power play that lasted 1 minute, 47 seconds - and included three clears by the Bruins - early in the third period. They are 2 for 14 in five-on-three situations.
Patrice Bergeron scored a goal in his seventh consecutive game to give Boston a 3-2 second-period lead.
Guarded closely by defenseman Kimmo Timonen (goal, assist), Bergeron surprised Mason with a turnaround shot from the left circle. The puck went under Mason's pads and put the Bruins ahead, 3-2, with 8:55 left in the second period.
Mason, who is among the league leaders with 31 wins, slammed his stick to the ice in disgust, aware he had allowed a rare cheap goal.
"He wasn't looking at the net when he shot it, and I was already down," Mason said. ". . . And as I was getting up, he shot the puck and I wasn't able to get back in time. It's a save I have to make."
About 51/2 minutes before Bergeron's goal, 6-foot-9 defenseman Zdeno Chara, left alone in front on a power play, used his long reach to backhand the puck off the right post and into the net, tying the score at 2.
Former Flyer Andrej Meszaros scored Boston's first goal.
"We should have won in regulation, but you have to give them credit," Meszaros said. "They really pushed us; they really worked hard, and you can see they are a desperate team trying to make the playoffs."
The Flyers are two points behind the second-place Rangers in the Metropolitan Division after New York's 5-0 rout of Edmonton on Sunday night.