The Capitals took a 3-0 advantage into the final period but the Bruins scored three times in the opening 10 minutes to tie it.
Carlson then scored on a slapshot with 6:35 to play and Alex Ovechkin added an empty-net goal with 52 seconds remaining to seal it.
Washington has won three in a row and five out of six. Boston had a three-game winning streak snapped.
Michal Neuvirth had the shutout working going into the third period but he was removed in place of Braden Holtby after giving up goals to Michael Ryder, Nathan Horton and Shawn Thornton. The first two scores came on the power play.
It was the NHL debut for Holtby and came in a pressure situation. He faced four shots in his relief of Neuvirth.
Boston also changed goaltenders, after Tim Thomas had his worst start of the season. Thomas, who was unbeaten in seven previous starts with three shutouts to his credit, gave up three goals on 25 shots before being removed at the start of the third. Tuukka Rask gave up the winning goal to Carlson.