After a goalless first half Paul Cook’s side were rewarded for their dominance as Gnanduillet’s headed home from close range, his third of the season proving enough to see Chesterfield advance.
Charlie Raglan went close to nodding the visitors ahead inside the opening exchanges after Gnanduillet’s earlier effort had forced a corner.
Next up was a chance for the hosts as Jordan Spence’s long ball forward sailed over the Spireites back four and into the path of free-scoring Benik Afobe inside 17 minutes, but goalkeeper Tommy Lee did well to block his effort.
Tendayi Darikwa capitalised on some sloppy defending to fashion some space inside the home side’s box just before half-time, but his lobbed effort failed to beat MK Dons keeper David Martin.
Gnanduillet struck eight minutes after the restart, steering a powerful downward header past the onrushing Martin.
Sam Morsy went close to making sure of the visitor’s place in the third round with a long-range effort, but Martin collected well as the game entered stoppage time.