Los Angeles shortstop Hanley Ramirez tied the game at 3-3 with an RBI single in the sixth, but Harrison and Neil Walker ripped back-to-back run-scoring singles with two outs in the seventh to put the Pirates on top.
Gaby Sanchez's RBI double capped the rally, which made a winner out of California native Gerrit Cole (5-3), who allowed three runs on six hits and two walks over 6 1/3 frames.
Harrison finished 2-for-5 with two RBI for the Pirates, who defeated the Dodgers in Los Angeles for the first time since Sept. 15, 2011.
Brandon League (1-2) was charged for all three runs in the seventh to absorb the loss, while Yasiel Puig went 2-for-4 with an RBI and a run scored for the Dodgers, who have dropped back-to-back games.
2014: The Year in Music [PHOTOS]