David Pastrnak and Brad Marchand each scored twice for the Bruins (19-11-2), who won for the fifth time in six games despite trailing 2-0 in the first period. Linus Ullmark made 27 saves.
Conor Sheary scored two goals for the Capitals (20-8-9), who have lost four in a row (0-2-2). Zach Fucale was pulled after allowing four goals on 16 shots. Vitek Vanecek made 12 saves in relief.
Washington has allowed 18 goals during the skid.
"We have to get back to our game, our game plan," Sheary said. "We have a lot of good players that have been in and out of the lineup, maybe get them back in and get some reps. We're not going to hit the panic button. We're just going to keep grinding away."
Sheary gave the Capitals a 1-0 lead at 3:02 of the first period on a backhand after Ullmark failed on a clearing attempt. He scored again at 12:32 with a one-timer from the left face-off circle to make it 2-0.
The Bruins tied it late in the first period when Pastrnak and Marchand each scored on the power play 40 seconds apart. Pastrnak cut it to 2-1 on a one-timer from the left circle off a pass from Marchand during a 5-on-3 advantage at 18:34, and Marchand tied it 2-2 with a wrist shot from the right circle at 19:14.
Marchand remained in the game after a high stick cut his nose with the Bruins trailing 2-0.
"We know what he's all about, so we've seen it: his compete level," Boston coach Bruce Cassidy said of Marchand. "Practice, game, optional skate, morning skate, you name it -- he's a competitive guy when he puts the skates on, and I think it demoralizes the other team a little bit."