Away tie for Gills in next round of the cup.
Gillingham will play Brentford away in the third round of the Carabao Cup.
Neil Harris' men booked their place in the next round after defeating Exeter 6-5 on penalties after a 0-0 draw in normal time at Priestfield on Tuesday, and have been rewarded with an away tie at a Premier League side.
The Bees, under the management of Thomas Frank, finished 13th in the table last season and have started this season well, defeating Manchester United 4-0 at the Brentford Community Stadium earlier in the month.
The full draw is as follows:
Leicester v Newport County
West Ham United v Blackburn Rovers
Wolves v Leeds United
Nottingham Forest v Tottenham Hotspur
Manchester United v Aston Villa
Bournemouth v Everton
Liverpool v Derby County
Burnley v Crawley
Bristol City v Lincoln
Manchester City v Chelsea
Stevenage v Charlton Athletic
MK Dons v Morecambe
Newcastle United v Crystal Palace
Southampton v Sheffield Wednesday
Arsenal v Brighton
Brentford v Gillingham
All ties will be played the week commencing November 7.
Ticket details will follow.