The Diamondbacks had a 2-0 lead going into the ninth, but the Nationals scored twice to force extra innings and both teams scored three times in the 10th.
Washington lost for the seventh time in eight games.
Drew doubled in Augie Ojeda with one out in the 11th off Luis Ayala (1-5) to put the Diamondbacks back in front. Orlando Hudson was intentionally walked and Conor Jackson followed with a single, only to have Drew thrown out at home.
Tracy, who drove in one of Arizona's runs in the 10th, then singled to drive in Hudson with the second run of the inning.
Chad Qualls (2-6) recorded the final two outs of the 10th to get the victory. The Diamondbacks have won three out of four.