The tie will likely be played at Priestfield on Saturday November 3, as it is unlikely to be considered for live TV coverage.
Gillingham have enjoyed a great start to the season under Martin Allen, and top League Two with 32 points from 13 games.
They are unbeaten in the league, with their only defeats coming in cup competitions.
They bowed out of the Johnstone's Paint Trophy with a 3-2 loss to Crawley Town, while their Capital One Cup campaign was ended in the second round with a 2-0 home loss to Middlesbrough. They had claimed the scalp of Bristol City with a 2-1 win at Ashton Gate in the first round of that competition.
Draw in full:Kidderminster Harriers v Oldham AthleticHayes & Yeading / Boreham Wood v BrentfordChelmsford City / East Thurrock United v ColchesterMetropolitan Police v Crawley TownLuton Town v AFC Telford / Nuneaton TownPortsmouth v Notts CountyBishop's Stortford v Hastings UnitedFleetwood Town v BromleyForest Green Rovers / Dartford v Port ValeTorquay United v Hyde / Harrogate TownAFC Bournemouth v Dagenham & RedbridgeMorecambe v RochdaleSwindon Town v Macclesfield TownCambridge City v MK DonsCheltenham Town v Yate Town / Newport CountyDorchester Town v Plymouth ArgyleCoventry City v Arlesey TownYork City v AFC WimbledonBury v Exeter CityChesterfield v Hartlepool UnitedDoncaster Rovers v Bradford Park AvenueGillingham v ScunthorpeAldershot v Hendon Lincoln / FC Halifax v WalsallWrexham v Alfreton TownSouthend United v Stockport CountyCrewe Alexandra v Wycombe WanderersBristol Rovers v Sheffield UnitedHereford United v Shrewsbury TownMansfield Town v Slough Town / Gosport BoroughBarnet v Oxford UnitedRotherham United v StevenageAFC Fylde / Ilkeston v Accrington StanleyGloucester City v Leyton OrientBurton Albion v AltrinchamGuiseley v BarrowNorthampton Town v Bradford CityPreston v Yeovil TownBraintree Town v Tranmere RoversCarlisle United v Ebbsfleet United