Both sides started the match at a high tempo and created a series of openings at both ends but poor finishing maintained the stalemate. Pinney twice broke into the box before firing wide while Andy Pugh's cross come shot failed to trouble Flahavan at his near post.
Midway through the half Palace found the net when Djilali's cross was tapped in by Pinney only to be ruled offside. Then moments later at the other end Odunaike's strong run into the box set up Pugh to shoot from the left side of goal but he hooked his effort into the Brian Moore Stand.
James Comley came closest to breaking the deadlock with a long range drive that struck the angle of post and bar shortly after the half hour. Seconds later Rooney laid off to Adam Miller in the area but Flahavan got down smartly to block his low strike.
Six minutes before the break the Eagles took the lead after a fine run down the left from Ryan Smith, the winger's deep cross was headed back across goal by Djilali for Cadogan to sweep into the far corner.
The home sides response was swift with Luke Rooney unleashing a powerful drive from the edge of the box which deflected onto the crossbar.
HT 0-1
At the start of the second half Gillingham introduced Emmanuel Adebayor lookalike, trialist Amodou Abdullei to their attack but Palace looked the more likely to add to their tally.
Long range efforts from Cadogan and Comley drew saves from Alan Julian but the second half was a largely dull affair until fifteen minutes from time when the Eagles struck the woodwork for the second time. On this occasion Cadogan was denied latching on to a Pinney through ball and beating Juian only to see his shot rebound to safety off the near post.
Seconds later Julian stood up well to deny Adelakun a certain goal before Garry Richards desperate lunge blocked another goalbound shot from Djilali as the visitors finished strongly.
Gillingham: Alan Julian, Jack Payne, Tom Wynter, Garry Richards, Chris Palmer, Luke Rooney, Adam Miller, Rashid Yussuff, Andy Pugh (Charlie Stimson 82), Luis Cumbers (46 Amodou Abdullei), Gabriel Odunaike (Jake Hall 82).
Subs not used: Conor Quinn, Connor Essam.
Crystal Palace: Darryl Flahavan, Michael Abnett, Matthew Parsons, Jack Holland, Jerry Nnamani, James Comley, Kieran Djilali, Hakeem Adelukan, Nathaniel Pinney, Kieron Cadogan, Ryan Smith.
Subs not used: Charlie Mann, Joe Goldsmith, Tauren McDonald-Roberts, Charlie Holness.