The Pirates were nursing a 1-0 lead heading into the ninth before producing some vital insurance that brought them their fourth win in a row.
Mark Melancon replaced Wilson and quickly dispatched the Nationals to earn his third save.
Francisco Liriano (10-4) allowed two hits over 7 2/3 innings to get the victory. He struck out eight and walked three.
Liriano outpitched Stephen Strasburg (5-8), who gave up a second-inning home run to Pedro Alvarez. Strasburg struck out 12 over eight innings. The three ninth-inning Pittsburgh runs were charged to Drew Storen.
Benedict Cumberbatch's dramatic reading of R. Kelly lyrics is just what you need
Exploding whale video goes viral on Internet