John Moore scored, and Jaroslav Halak made 35 saves for Boston (31-17-8), which extended its point streak to seven (4-0-3). The Bruins were winless in their past 12 home games against the Avalanche.
"It's a character win," Bruins forward Chris Wagner said. "Tight game, it's a good team. Even though they haven't been doing great, they compete and their fast. And great job by [Halak] too."
MacKinnon scored a goal just as a Colorado power play ended with 33 seconds left in the first period to give the Avalanche a 1-0 lead.
Moore scored on a wrist shot from the top of the left face-off circle to tie it 1-1 at 3:40 of the second period.
"Secondary scoring, right," Bruins coach Bruce Cassidy said. "Johnny Moore, it's nice for him to find the back of the net. It was tough out there today, we didn't have much in the first period, you could see it in the guys that it'd been a long week. They had a similar schedule, so it was going to be tough if we had to chase the game all day.
"So we acknowledged between periods that 'Let's just be patient,' and we did have a good second, got one early enough and wanted to make sure we didn't have to chase it again."
In overtime, Marchand made sure the Bruins completed their sweep of a weekend back-to-back; they defeated the Los Angeles Kings 5-4 in overtime here Saturday.
"[Patrice Bergeron] had his guy beat to the net, so I figured if I could get it into [Bergeron] that he'd be able to walk across and hopefully make a play," said Marchand, who got the puck back from Bergeron before skating to the top of the slot. "But we got a lucky bounce and we'll take it."