And in the bottom of the 11th, Werth one-upped himself with the biggest hit of the night when he drove a 2-2 sinker from reliever Brandon Cumpton off the left-field wall for a leadoff double. After Denard Span advanced Werth to third with a groundout, pinch-hitter Scott Hairston -- the last man remaining on the Nationals' bench beside backup catcher Jose Lobaton -- skied a sacrifice fly to deep left field that propelled the Nationals to a 6-5 victory over the Pirates at Nationals Park.
It was Washington's sixth straight win and second walk-off victory in as many games.
"There's a lot at stake here this season, and I want to be a part of it. I don't want to come back before I'm ready," Werth said. "But at the same time, I felt like we'd progressed enough and felt good enough to get in there, especially in the situation."
The Nationals carried a 4-2 advantage into the top of the ninth inning after reclaiming the lead with three runs in the seventh. But closer Rafael Soriano surrendered three runs on two hits and a wild pitch for the third blown save in his last 11 chances. The deciding hit was a two-run double from right fielder Gregory Polanco that put the Pirates ahead, 5-4.
"Sori's got to try to get out of the inning. He's been our closer all year and done a great job for us," Williams said. "Lately it hasn't been what he wants, but we've got to give him a chance to get out of that inning."
Werth said Williams originally planned not to use him with the Nationals leading after seven innings. But when the Pirates went ahead in the ninth, Werth headed to the batting cage in the clubhouse to test his shoulder.
"I went back down there and swung again and felt like if I had to, I could make a difference," Werth said. "So I came back out, told him I was available and the situation came up and they used me."
Prior to that, sloppy play from both teams marred the first seven innings.
All season, the Nationals' defense has been Doug Fister's greatest weapon. The right-hander's quick pace and deadly sinker typically foster stellar fielding behind him. Players need to be on their toes, always ready for contact.
But on Sunday, Washington's defense crumbled behind Fister during the Pirates' two-run sixth inning, which began when Ian Desmond botched a routine ground ball off the bat of leadoff hitter Polanco. Josh Harrison followed that with a hit-and-run single through the right side of the infield that put runners on the corners for Neil Walker.
Walker chopped a hard ground ball up the middle that Fister corralled after leaping off the mound. The right-hander spun to check on Polanco at third and realized the right fielder was off the bag. But instead of throwing to home plate and in front of the runner, Fister fired behind Polanco to third baseman Anthony Rendon.
Polanco took off for home, and Rendon's low throw skipped away from catcher Wilson Ramos, giving the Pirates a 1-0 lead. Harrison advanced to third on Rendon's errant delivery, and in the next at-bat, Russell Martin singled to right field to extend Pittsburgh's advantage to two runs.
Despite loading the bases after a Pedro Alvarez single, Fister -- who took a no-hitter into the fifth -- escaped the inning without any further damage thanks to two ground balls and flyout.
"We know we have a job to do, and it doesn't matter what the circumstances are. Whether we're behind or whether we're winning, it doesn't matter," said Fister, who allowed five hits over seven innings. "As a pitcher, I've got to go out there and make a pitch. I've got to get the defense the best opportunity to make plays … and it worked out that way tonight."
The Nationals closed the Pirates' lead to one with a run in the bottom of the sixth off starter Edinson Volquez, the lone earned run he surrendered in 6 1/3 innings. Rendon singled and Adam LaRoche walked before Desmond cranked an RBI single to center field.
Washington then took the lead in the seventh with three unearned runs on two Pirates throwing errors.
Michael Taylor reached base with one out after Williams' successful challenge. Taylor appeared to be hit in the left hand by an errant fastball from Volquez, but home-plate umpire Andy Fletcher ruled that it didn't hit him. The call was overturned to a hit-by-pitch after review, and the rally blossomed from there.
Back-to-back singles from pinch-hitter Kevin Frandsen and Span loaded the bases for Cabrera, who sent a slow-rolling ground ball to the right side on the first pitch he saw from reliever Jared Hughes. First baseman Ike Davis charged and fielded, but his throw sailed high and tipped off the glove of catcher Martin. Both Taylor and Frandsen came around to score on the play.
In the next at-bat, Rendon grounded to third baseman Pedro Alvarez. In nearly identical fashion to Davis, Alvarez misfired high on his throw and Span slid home safely to extend the Nationals' lead to 4-2.
After Soriano's collapse and the Nationals' comeback in the ninth, reliever Ross Detwiler threw scoreless 10th and 11th innings to set the stage for Hairston's walk-off drive.
"Today was a tribute to just the team mentality in general," Fister said. "That's a lesson learned for us, knowing that [if] something goes wrong, there's 24 guys right behind you that pick you up. Whether it's offense, whether it's defense, guys are playing well together. … Guys are fighting for each other. And that's going to be a huge key for us later in the season."