Burnley started the pre-season game at Deepdale superbly and deservedly went ahead through lively new signing Lukas Jutkiewicz after 15 minutes.
However, Preston - who were impressive in a narrow pre-season defeat to Liverpool earlier in July - then showed just why many are tipping them for promotion from League One in the upcoming campaign.
Midfielder Alan Browne drew Simon Grayson's side level seven minutes into the second half before teenager Brownhill struck a goal worthy of winning any game at the death.
The Premier League new-boys unsurprisingly began the match on the front foot and Jutkiewicz - who had already forced a fine save from Preston goalkeeper Jamie Jones - slotted them in front on the quarter-hour mark after some good work from David Jones.
Joe Garner was proving a constant threat for Preston, though, and he twice went close to scoring in the first half.
Grayson's men did not have to wait long after the restart to equalise as Browne's shot from 12 yards took a minor deflection on its way past Burnley stopper Matt Gilks.
The flow of what had been a watchable affair was disrupted with a number of substitutions thereafter but it was a player who had started the game who lit up Deepdale late on.
Brownhill took aim with a dead ball from all of 30 yards and smashed a rocket of a shot past Gilks into the top corner to give Preston a hard-fought win.