Steven Jennings put City in front four minutes before half-time, poking home from close range after William Edjenguele had headed Carl Baker's free-kick across goal.
Preston equalised from a corner in the 67th minute as Luke Foster rose highest to meet John Welsh's deliver and his header hit defender Blair Adams on the way in.
The visitors thought they had won it 10 minutes from time. Stuart Beavon was allowed to cut in and shoot on his left foot and his 18-yard strike deflected off Richard Wood, wrong-footing Joe Murphy, and into the net.
But Baker levelled two minutes into time added with a low strike at the back post after good work from Franck Moussa.
Leon Clarke then completed the unlikely turn around, walking the ball in for his first City goal after Steve Simonsen parried Baker's initial 20-yard shot.