Two goals shortly after half time from the Lilywhites prevented the Gills from marking Peter Taylor’s return to the club with a point.
Keith Keane and Josh Brownhill got the goals to go two up, and although Danny Kedwell got one back from a Chris Whelpdale free-kick with just over ten minutes to go, the hosts were unable to find a way through for the second time.
For his first Gills selection for 13 years, Peter Taylor resisted the temptation to make wholesale changes to the side that lost at Shrewsbury last weekend.
Leon Legge returned to the back-four to help cope with the threat of former England centre-forward Kevin Davies, while Michael Harriman replaced Charlie Allen at right-back, after recovering from a calf strain.
Not surprisingly, for a team placed in the play-off positions, Preston looked full of confidence and spurned early openings for Stuart Beavon and Scott Laird.
The Gills, urged on by a boisterous Rainham End, preferred a more patient approach to the opening exchanges, looking to catch their opponents on the counter attack.
The visitors threatened again on 10 minutes, Davies helping the ball onto Beavon on the right of goal but fortunately the livewire striker could only find the side-netting with a shot from a tight angle, while Davies glanced a header into the hands of Stuart Nelson, from a Chris Humphrey centre.
After soaking up the early pressure the hosts responded just after the quarter hour, following Tom Clarke’s yellow card challenge on Cody McDonald, midway inside the Preston half.
Danny Hollands curled in a testing set-piece but Davies was able to head clear, under pressure from Adam Barrett.
Charlie Lee was next in the book, for what seemed a very harsh caution on 25 minutes after the midfielder clipped the ankles of Welsh on the left touchline.
Welsh got up to take the free-kick himself and was aggrieved to see Stuart Nelson claim his ball to the far post.
Three minutes later Preston fashioned the best chance of the half from a lovely free-flowing move that saw Davies feed Keane, who in turn sent Beavon clear, he squared to Humphrey, who let fly with a ferocious effort from 25 yards that Nelson did well to palm around his right hand upright.
Brownhill dinked a shot over on 32 minutes, before Danny Kedwell set Michael Harriman up to cut in and shoot from the right of the box, sadly the youngsters effort curled just over the keeper’s top right corner.
Ten minutes before the interval Gills had a let-off after Beavon headed Laird into space on the left of goal, fortunately the Preston full-back pulled his finish wide of Nelson’s far post, as the sides went in all square at the break.
The visitors came out with renewed intent after the interval and scored from their first attack. Keith Keane collected a ball in from the right, took a touch and wheeled away in celebration as his shot found the net, off Adam Barrett.
Gillingham responded with purpose and almost hit back instantly, Chris Whelpdale cutting in from the right before rolling his finish agonisingly wide of the far post, then moments later the same player collected a pass from Lee but saw his finish charged down by keeper Declan Rudd.
With the Gills committing men forward in numbers, they were caught on the counter in the 52nd minute, allowing the Lilywhites to extend their advantage. Beavon ran at the home defence before squaring for Josh Brownhill to slot beyond the outstretched Nelson and into the far corner for 2-0.
The goal prompted a change for the Gills, Myles Weston coming on for Cody McDonald to add pace down the right flank, while Lee moved across into centre midfield. He was followed soon after by Antonio German, who replaced Lee, partnering Kedwell in attack.
The changes led to a good spell of possession for the hosts who earned a route back into the game on 75 minutes after Weston had been brought down by Keane on the left edge of the box.
Chris Whelpdale delivered the set-piece, straight to Danny Kedwell who rose above the Lilywhites defence to head down into the far corner, setting up a frantic final 15 minutes.
On 81 minutes Whelpdale tested the keeper again with a low drive from a free-kick after Huntington had fouled German, but Rudd proved equally to the challenge, gathering low to his left.
They went closer still three minutes from time as Leon Legge helped Martin’s ball onto Kedwell in the area but the goalscorer headed straight to the keeper this time.
With time ticking down Peter Taylor sent on Bayo Akinfenwa as the Gills switched to an attacking 4-4-2 with Weston and German down attacking down the flanks.
Joe Martin came closest to grabbing an equalizer right at the death, but Preston stood firm and saw the time out to claim the win.
Gillingham: Stuart Nelson, Michael Harriman, Adam Barrett, Leon Legge, Joe Martin, Charlie Lee (Antonio German 66), Danny Hollands (Bayo Akinfenwa 88), Steven Gregory, Chris Whelpdale, Danny Kedwell, Cody McDonald (Myles Weston 57)
Subs not used: Amine Linganzi, Callum Davies, George Howard
Preston North End: Declan Rudd, Keith Keane, Scott Laird, Paul Huntington, Tom Clarke, Bailey Wright, Chris Humphrey (Lee Holmes 90+2), Kevin Davies, Stuart Beavon (David Buchanan 85), John Welsh, Josh Brownhill (Joel Byrom 70)
Subs not used: Thorsten Stuckmann, Joe Garner, John Mousinho, Iain Hume
Attendance: 7,054 (301 Preston)