Gillingham earned a valuable point at Deepdale with a last-gasp equaliser by captain Paul Smith as Stan Ternent's side continued their battle to beat the drop.
Preston looked to have sealed a comfortable three points after having the majority of possession but one goal proved to be not enough.
But the draw did extend their excellent recent run to just one defeat in 17 league games.
The hosts started brightly and in the 23rd minute Richard Cresswell headed the ball down to 19-year-old David Nugent who ran through the Gillingham defence before seeing his 25-yard right-foot shot fly wide of the left-hand post.
Preston opened the scoring in the 28th minute when Graham Alexander played Nugent in. The youngster hit an acrobatic right-foot shot which rebounded off the post before hitting the back of Gillingham goalkeeper Jason Brown and rolling into the net. Nugent will probably claim his fifth goal for Preston.
Nugent then fired over the bar as did Paul McKenna as Billy Davies' side remained on top.
Chris Hope had a header saved by home debutant Carlo Nash but
Preston deservedly went in at half-time 1-0 ahead.
On the hour mark Nugent ran through after being sent clear by Cresswell but his 20-yard right-foot shot was saved by Brown.
Eddie Lewis had a shot saved by Brown but just when it looked as though Preston had strengthened their position in the play-off places, Smith equalised for the Gills when he headed Nyron Nosworthy's corner home.