Early second-half goals from Keith Keane and 17-year-old Josh Brownhill consigned Gillingham's new interim manager Peter Taylor to defeat with Danny Kedwell's 76th-minute strike proving a mere consolation despite a late rally from the hosts.
The three points lifts Preston up to fourth in the table, despite having lost their previous two outings and while Grayson was pleased with the win he urged his players to be more clinical in the final third.
"For 60 minutes, we were totally cruising. I thought we controlled the first half, we just needed to up the tempo in the final third," Grayson said.
"We got the two goals and then obviously their goal changed things.
"They (Gillingham) had nothing to lose, they went for it, and the last five minutes we had to hang on.
"But we expected that, we hung in there and we've got three points.
"We've need to be more aggressive in the final third.
"We need some shots in - I don't mind players missing opportunities as long as their making them.
"Keano (Keith Keane) got in with his, then what a debut for Josh (Brownhill) to get the second one.
"Fair play to Josh, I thought he was very composed, he got into good areas and was in the right place at the right time.
"Many players would have slashed at it, but he deserved his chance."