Joey Meneses added an RBI single for the Nationals (65-79), who came into the game in a 3-10 funk.
Washington starter Patrick Corbin (10-13) allowed two runs and five hits in 6 2/3 innings. He finished with eight strikeouts, one shy of his season high, and one walk.
Ji Hwan Bae hit an RBI double and Bryan Reynolds had an RBI single for the Pirates (66-78), who have lost three of four.
Pittsburgh starter Andre Jackson (1-3) gave up four runs and four hits in four innings, with one strikeout and two walks.
In the third, Washington's Ildemaro Vargas singled to left but was erased on Luis Garcia's forceout. Garcia was erased on Jacob Young's forceout. After Young stole second, Abrams homered to right-center, giving the Nationals a 2-0 lead.
Pittsburgh got one back in the bottom of the third. Jared Triolo reached on an infield single, stole second and went to third on a groundout. Reynolds extended his hitting streak to 12 games with a two-out single up the middle, driving in Triolo to make it 2-1.
Washington added a couple in the fourth. Keibert Ruiz doubled to right-center and scored on Meneses' single to right. After Smith lined out, Travis Blankenhorn and Vargas walked to load the bases. Garcia's forceout brought Meneses home to increase the margin to 4-1.
Smith hit his eighth homer, to center, with one out in the sixth to put Washington ahead 5-1.
With one out in the seventh, Abrams homered to right, giving him the first multiple-homer game of his career and 18 on the season. He was back after sitting out Sunday because of a bruised knee.
In the Pittsburgh seventh, Miguel Andujar doubled to right. After Endy Rodriguez grounded out and Liover Peguero struck out, Bae doubled down the line in right, with Andujar scoring to cut it to 6-2 and chase Corbin.
Washington reliever Jordan Weems got four outs and Jose A. Ferrer tossed a scoreless ninth.
—Field Level Media