"Whenever you come back down from 2-0 it shows character by all the players, the goaltending making the key saves after being down," Canadiens coach Jacques Martin said. "Also what I liked best was how we supported each other as teammates, how we came to help each other when somebody was in trouble. Those are good signs, those are promising signs."
Carey Price stopped 29 shots for the Canadiens, who finished the preseason with a 4-2-1 mark.
Montreal will open its 101st season Thursday night in Toronto.
"It's always good to win the last exhibition game and to win it that way, when you're losing 2-0, is just great for the confidence and for the team," said Lapierre, who scored with 22.4 seconds left in the second to tie it at 2.
"I think we got away from our game a little bit," Sabres coach Lindy Ruff said. "We had a lot of sell-inflicted pain where big turnovers led to big chances. We spent a little bit too much time in the penalty box but I think there was a lot of good character building in the game. When you get in those scrums and start sticking up for each other, there was a lot of good stuff."
Miller made 18 saves. He denied Lapierre on a two-man break and Scott Gomez on another breakaway while protecting a 2-1 lead in the second.
"He's a great goaltender and with good goalies like that you've got to try to be on top of him, be in front of him and try to be around that net," Gionta said. "You've got to try and get those second and third chances and we worked hard around the net, I thought."
Buffalo's Patrick Kaleta got a boarding major and a game misconduct 2:53 in for his check on Tom Pyatt along the boards.
Gionta scored a power-play goal 12:32 into the second to draw Montreal to 2-1. He got his fourth goal in four games when he beat Miller with a shot from the slot, just 6 seconds after Buffalo was called for too many men.
Lapierre tied it with a delayed penalty signaled against Buffalo late in the second when he out of the penalty box and drove a slap shot between Miller's pads from the slot.
MacArthur gave the Sabres an early lead when he scored on a breakaway 55 seconds in. He broke across the Canadiens' zone from the right side and slipped the puck around Price's outstretched right pad for his second goal in four games.
Montreal defenseman Ryan O'Byrne got 17 minutes in penalties for instigating a fight with Kaleta after the Sabres forward's check drove Pyatt's head into the glass. Pyatt was helped off the ice and did not return.
Martin said Pyatt is day-to-day with an "upper body" injury and that his condition will be re-evaluated.
"Obviously it was a shot to the head and I think the league usually looks at those incidents," Martin said. "What I liked best about it was how we reacted as a team and several times during training camp teammates have come to help each other, which is a good sign."
Ruff didn't expect any further sanction against Kaleta.
"He's got to be a little bit more careful there but there was no intent, no running at him," Ruff said. "I think it was Pyatt just had himself in a bad spot."
Gerbe scored an unassisted short-handed goal at 10:30 as he drove the net and beat Price with a backhand to put the Sabres up 2-0.