Dickey (20-6) tied Washington's Gio Gonzalez, for the major-league lead in wins this season. Gonzalez was to pitch Thursday night.
Dickey scattered eight hits and three runs over 7 2/3 innings. He walked two and struck out 13, giving him a league-leading 222 strikeouts this season.
A two-run home run by Alex Pressley, his 10th of the year, pulled the Pirates within 6-5 in the ninth before Bobby Parnell got the final outs for his fifth save.
Pittsburgh got to Dickey for two runs in the second when they had four hits, including RBIs by Rod Barajas and Jordy Mercer. Davis connected for his 31st home run this season in the bottom of the inning.
Barajas put Pittsburgh up 3-1 with a home run in the fourth but the Mets answered with a Scott Hairston RBI single.
New York took the lead with a four-run fifth that including a three-run homer by Wright that handed the loss to Kevin Correia (11-11), who was charged with all the New York runs on seven hits.
UPI horse racing weekend preview
Bo Jackson: I can't help Jameis Winston anymore