Cole (5-3) yielded a first-inning single to Bryce Harper and a third-inning solo homer to Wilson Ramos, but otherwise shut the door on the Nationals, retiring 15 of the final 16 batters he faced.
The rookie right-hander issued one walk and struck out four as Pittsburgh won a third straight.
Meanwhile, Cole raised his batting average to .357 (5-for-14) with a run-scoring single that capped a three-run second inning.
Pedro Alvarez cracked a solo homer and Russell Martin went 3-for-4 with two runs scored for the second-place Bucs, who came into the contest trailing National League Central-leading St. Louis by 1 1/2 games.
Washington's Taylor Jordan (0-3) was hung with the loss, surrendering five runs (four earned) on nine hits over 7 2/3 frames.
Susan Sarandon 'very excited' about daughter's pregnancy
Interpol investigating stolen passports on missing flight