© Getty Images
Massadio Haidara posed a threat for the visitors early on, but found himself in an offside position while waiting for a cross.
The Premier League side continued to see the majority of the possession, and made it count when Egan turned the ball into his own net while trying to defend a Gabriel Obertan cross.
Emmanuel Riviere was involved at the start of the second half as he tried to fire home from a Haidara cross, but he sent his effort just high, while Haidara came close again moments later, smashing a powerful shot onto the crossbar.
Krul had to be alert again at the other end as Gillingham continued to look for an equaliser, but Bradley Dack failed to test the Newcastle keeper with his high finish.
A mistake from Krul almost gifted the hosts an equaliser with 20 minutes to go when he gave the ball to Luke Norris, but saved from the Gillingham substitute moments later to make amends.
Newcastle forced a string of corners as the final 10 minutes approached as they looked to end any hopes of a comeback by the League One side, but Cabella and Daryl Janmaat both missed.