Gonzalo Martinez came off the bench to break the deadlock in the 89th minute before Josef Martinez sealed the victory in stoppage time.
Playing in the absence of former Manchester United and England star Wayne Rooney, who was rested for the Atlanta trip, DC should have fallen behind in the 72nd minute.
Josef Martinez earned a penalty but the Venezuela international was unable to convert, firing his spot-kick over the crossbar after a stuttered run-up.
However, Gonzalo Martinez managed to break the deadlock with a close-range header in the final minute of regulation before Josef sprung the off-side trap and added a second in the second minute of stoppage time.
With the win, Frank de Boer's Atlanta leapfrogged DC into second position in the east – three points adrift of Philadelphia Union with a game in hand.
Elsewhere, New York Red Bulls were 1-0 winner away to Orlando City courtesy of Brian White.
Brian Fernandez's brace led Portland Timbers past Seattle Sounders 2-1 and New England Revolution defeated lowly FC Cincinnati 2-0.