Bergeron slammed on the brakes after approaching from the right side and beat Jaroslav Halak with Boston's second attempt.
"I had a move in mind, but I read something else from the goalie so I had to go 5-hole," Bergeron said. "It wasn't the first intention that I had but it worked out."
Sergei Kostitsyn scored early in the second to put Montreal up 1-0, and Mark Stuart drew the Bruins even 1:37 into the third period.
Thomas stopped 33 shots for the Bruins (4-1-1).
"I had a rough first outing in the preseason and it's good to follow it up with a strong one," said Thomas, the Vezina Trophy winner last season as the NHL's top goalie. "It doesn't mean that everything's perfect now, but it's a step in the right direction."
Halak made 26 saves for Montreal (3-2-1).
Canadiens left wing Mike Cammalleri left the game because of an undisclosed lower-body injury after the first period. He did not return.
"It's more precautionary, nothing serious," coach Jacques Martin said. "We just wanted to make sure that it didn't get worse and we feel that it'll be all right. Whether he'll play Saturday, we'll see, but what's more important is October 1st."
Kostitsyn pushed home Tomas Plekanec's rebound from the right edge of the crease 59 seconds into the second after the puck became loose behind Thomas.
Stuart tied it early in the third when he took Michael Ryder's centering pass from behind the net and put a backhand past Halak.
Bruins center Vladimir Sobotka collided with Halak behind the Canadiens' net later in the period, sending the Slovak goalie's mask flying. No penalty was called on the play as players from both teams exchanged words. Halak lay on the ice for several moments, though he remained in the game.
Montreal coach Jacques Martin used his timeout 3:50 into overtime after Boston was called for too many men with 4 seconds remaining in Canadiens right wing Matt D'Agostini's minor penalty.
Bruins coach Claude Julien used a similar opportunity to strategize when he called time after D'Agostini was sent off for tripping Andrew Ference at 1:53.
The Canadiens held a 34-27 advantage in shots overall, including a 5-4 edge in overtime despite killing D'Agostini's entire penalty.
Boston's Guillaume Lefebvre had a lengthy bout with Gregory Stewart 12:44 into the first that left the Montreal left wing with a gash over his right eyebrow.
"I think it was his first shot," Stewart said. "He's a lefty and I kind of opened myself up and he just got me with a good shot to the eye. It kind of made me a little more (upset), knowing that I was bleeding, so I had to do something to redeem myself."