David Pastrnak also scored for Boston (36-13-8), which moved within one point of Tampa Bay for first place in the Atlantic Division and Eastern Conference. Boston has two games in hand.
Matthew Tkachuk scored for the Flames (30-21-9), who fell to 1-3-4 in their last eight home games.
With the teams meeting for the second time in six days, Calgary was territorially outplayed by a wide margin in the first period but Rittich kept the Flames in it.
Calgary tied it 1-all at 5:28 of the second, striking on the power play. Sean Monahan's shot was stopped by Tuukka Rask, but as the puck lied at the feet of Zdeno Chara in the crease, Tkachuk knocked in his 22nd goal.
Tkachuk is on a tear with 14 goals in his last 22 games.
Rittich was starting his fourth game in a row, with veteran Mike Smith (lower body) still sidelined. It was a nice bounce-back effort from Rittich. He was pulled Saturday night after giving up four goals on 15 shots.
The 25-year-old Czech was especially sharp in keeping the score even at 1.
A minute after Calgary tied it, Rittich slid across the crease to get a glove on Marchand's backhand out of midair after he was set up by Patrice Bergeron.
Late in the second, Rittich stabbed out his glove to rob Ryan Spooner on a breakaway. In the third, the goalie stared down Pastrnak on a breakaway and acrobatically got the toe of his left pad on a dangerous chance.
Rittich finished with 30 stops but fell to 6-3-3.
Rask was also coming off a shortened outing in his previous start, pulled after giving up four goals on eight shots in the first period against Vancouver.
Rask made 28 saves to improve to 24-10-4.
Boston struck first at 5:59 when Michael Frolik coughed up the puck along the sideboards in his own end and Pastrnak pounced on it, quickly firing a shot past Rittich on his blocker side.
Flames D Travis Hamonic played in his 500th career game. ... Calgary LW Morgan Klimchuk, drafted in 2013, made his NHL debut on a line with C Matt Stajan and RW Curtis Lazar. Every player selected in the first round of that draft has now played an NHL game. ... The Bruins improved to 9-1-3 in their last 13 games against Calgary. ... Boston is 23-1-5 when scoring first.
Bruins: Tuesday night at Edmonton.
Flames: Wednesday night at Vegas.
More NHL hockey: https://apnews.com/tag/NHLhockey