Harrison sent a fastball from Miami’s Mike Dunn (2-3) into the first row of seats in left-center field for his first career walk-off homer.
Dunn had worked out of a bases loaded, no-out jam in the eighth.
Bryan Morris (5-4) pitched a perfect top of the ninth for the victory. The Pirates have won three straight and are a season-high 24 games over .500 (68-44).
Neil Walker had three hits for the Pirates. Andrew McCutchen had two hits, including a two-run double, for Pittsburgh.
Donovan Solano went 3 for 5 for the Marlins but Miami left 11 runners on base.
Source: Associated Press