Premier League opposition to visit Priestfield in round three of the FA Cup.
Gillingham will play Cardiff City at The Medway Priestfield Stadium in the third round of the Emirates FA Cup.
The draw was made at Stamford Bridge on Monday evening with Gills boss Steve Lovell present at Chelsea Football Club where Mark Chapman conducted proceedings with Ruud Gullit and Paul Ince in charge of drawing the ties.
The Gills beat Slough Town 1-0 on Sunday to advance to the third round for the first since 2012.
Draw in full:
Bolton Wanderers v Walsall or Sunderland
Millwall v Hull City
Gillingham v Cardiff City
Brentford v Oxford
Sheff Weds v Luton
Man Utd v Reading
Everton v Lincoln City
Tranmere Rovers/Southport v Spurs
Preston v Doncaster Rovers
Newcastle United v Blackburn Rovers
Chelsea v Nottingham Forest
Crystal Palace v Grimsby Town
Derby County v Southampton
Accrington Stanley v Ipswich Town
Bristol City v Huddersfield Town
Wrexham or Newport v Leicester City
Fulham v Oldham
Shrewsbury Town v Stoke City
Solihull Moors or Blackpool v Arsenal
Man City v Rotherham United
AFC Bournemouth v Brighton
West Ham v Birmingham City
Woking v Watford
Burnley v Barnsley
QPR v Leeds United
Sheffield United v Barnet
Norwich City v Portsmouth
Guiseley or Fleetwood v AFC Wimbledon
West Brom v Wigan
Middlesbrough v Peterborough or Bradford
Wolves v Liverpool
Aston Villa v Swansea
Ties will be played the week commencing January 4-7, 2019.