Leading 1-0 at the interval courtesy of Jack Muldoon's 13th goal of the season, the Sulphurites were pegged back by Andy Cook's 78th-minute effort and, at that stage, looked as if they would do well to hang on for a point.
But McPake had other ideas, profiting from some good work in midfield by Muldoon, cutting inside off the left flank and curling a delightful finish across Richard O'Donnell and into the far corner of the away net.
And, the Glasgow Rangers loanee's late strike wrapped up more than just three points, with Saturday's win ensuring that Harrogate cannot now be relegated and will thus be playing League Two football once again next season.
It was the Bantams who made the brighter start to the contest and almost took the lead on three minutes when Clayton Donalson met Billy Clarke's right-wing corner, forcing the recalled Joe Cracknell into an excellent reaction save.
With big targetman Cook winning almost everything in the air and Harrogate's defensive work rather lacking in conviction, it was the visitors who continued to look the more likely during the opening quarter of an hour.
They went close again as Cook climbed highest to nod the ball into the direction of Finn Cousin-Dawson, who saw an acrobatic overhead effort narrowly clear the cross-bar with Cracknell scrambling.
Having conceded from under-hit back-passes in each of their previous two matches, Town were almost punished in the same fashion on 17 minutes when Connor Hall failed to get enough on his ball back to Cracknell, allowing Cook to nip in.
Having made his way around the sprawling home custodian and opted to stay on his feet despite under contact, the City striker would have been presented with an open goal, were it not more an excellent covering challenge from Will Smith.
But, having survived those scares, Weaver's men eventually started to play a bit of football, with veteran forward Jon Stead very much to the fore.
And, following their first decent spell of football they took the lead as the ball reached George Thomson wide on the right flank and he lifted the ball over the top of the visiting back-four for Muldoon to run onto.
Town's leading scorer drove towards goal and kept a cool head, sliding his finish across O'Donnell and into the bottom corner.
With the hosts now in the ascendancy, Thomson rolled a clever free-kick into the right channel, where it was met by Stead who pulled a shot across the face of goal.
At the other end, Cook's first-time blast drew a good parry out of Cracknell, though the Bantams would head into the interval a goal behind.
They almost had an equaliser four minutes after the resumption, though Cracknell again did well to frustrate the away team, getting down low to push Levi Sutton's cultured shot around the post.
Thomson then missed a chance to double the Harrogate advantage, drilling a vicious blast off the top of the cross-bar having been played clean through on goal by Muldoon's defence-splitting pass.
What had become an end-to-end affair then saw Bradford striker Cook again test Cracknell, while almost immediately, Muldoon got in behind at the other end and delivered a delicious low centre for McPake, but some superb last-ditch defending by Cousin-Dawson somehow diverted the ball to safety.
Having failed to grab a second, the Sulphurites began to drop deeper and deeper as City began to reclaim the ascendancy.
Thus, it came as no real surprise when they drew level on 72 minutes, substitute Ollie Crankshaw showing some neat footwork as he weaved his way through the middle of the pitch before slipping a pass into the feet of Cook, who swept the ball beyond Cracknell.
The minutes that followed saw the Bantams continue to turn the screw, Donaldson dinking a cute effort over Cracknell but wide of the upright, while Connor Wood took aim from range but placed his strike too close to the busy Town goalkeeper.
With the match into its final 10 minutes, there only looked likely to be one winner, but having fought their way back off the ropes, Harrogate delivered a late knock-out blow.
Muldoon initially did well to hold the ball up and get his team up the pitch, and although possession was initially surrendered, Ryan Fallowfield stood up and dispossessed Crankshaw near halfway.
The substitute right-back then picked out Muldoon, who in turn found McPake and the Scottish youth international did the rest from 20 yards out.
Victory sees Town climb one place up to 16th in the League Two standings, while Bradford drop to 13th but remain just four points shy of the division's final play-off berth.
Harrogate Town: Cracknell; Burrell, Smith, Hall, Jones (Fallowfield 56); Thomson, Falkingham, Kerry, McPake; Muldoon, Stead (Beck 74, Williams 90+6). Unused substitutes: Belshaw, Kiernan, Francis.
Bradford City: O'Donnell; Cousin-Dawson, P O'Connor, A O'Connor, Wood; Sutton, Watt (Evans 70); Clarke (Scales 90), Donaldson, Vernam (Crankshaw 70); Cook. Unused substitutes: Hornby, Stevens, Foulds, Rowe.
Referee: J Adcock (Nottinghamshire).