Anderson turned aside all 11 shots he faced in the final 20 minutes, including several close-in chances as the Senators clung to a one-goal lead.
Kyle Turris got the go-ahead goal early in the second period and the Sens hung on to take a second consecutive win for the first time since early November.
Mika Zibanejad also scored and Clarke MacArthur added an empty-netter.
Joel Ward scored and Philipp Grubauer made 35 saves for the Caps, who fell for the fourth time in five games.
Dennis Rodman pledges to end trips to North Korea
Interpol investigating stolen passports on missing flight