The Australian, who won gold in the individual pursuit at Manchester Velodrome, had been among the favourites for victory on the road.
The Francaise des Jeux rider won a stage on this year's Tour de France against the leading cycling professionals in the world.
His good form continued in Manchester when he won gold on the track on Wednesday despite being diagnosed with the infection earlier in the day.
But head coach Shayne Bannan confirmed the condition had since worsened and he had pulled out of further competition as a result.
McGee's place will be taken by Luke Roberts, part of the team pursuit quartet which won gold in the velodrome on Thursday.
And Bannan insisted he had every confidence in the late replacement.
He said: "Luke's been in fantastic form all year."
Australia still look among the favourites to take road race gold, despite McGee's absence.
They will be represented by Stuart O'Grady and Baden Cooke, who have both ridden on the Tour de France.