Rovers beat Manchester City in a penalty shootout, while the Gills beat Portsmouth at Priestfield.
League Two side Grimsby, who stunned a full strength Tottenham Hotspur side, will host Newcastle United at Blundell Park.
Cods boss Russell Slade said: "It is great for us, a fantastic draw.
"For them to come to Blundell Park, as with Spurs, is fantastic for our supporters.
"It will be another packed house again, we look forward to it."
And Barnet, promoted into the Football League as Conference champions last season, face a trip to Old Trafford to play Manchester United.
Third round draw:
Doncaster v Gillingham
Bolton v West Ham
Crystal Palace v Liverpool
Manchester United v Barnet
Chelsea v Charlton
Reading v Sheffield United
Fulham v West Brom
Mansfield v Millwall
Sunderland v Arsenal
Everton v Middlesbrough
Wigan v Watford
Grimsby v Newcastle
Aston Villa v Burnley
Blackburn v Leeds
Cardiff v Leicester
Birmingham v Norwich
Ties to be played week commencing 24 October