The former Coronation Street star, who played Rovers Return landlady Bet Lynch in the soap, opened the Noel Coward Theatre show earlier this month alongside Kelly Brook, Arabella Weir and Jan Leeming.
Ex-EastEnders actress Hannah Waterman will replace the 67-year-old in her role of Cora from December 1.
A spokesperson for Goodyear announced: "Due to a debilitating virus, Julie has been told by doctors to rest. She will be fine, she just needs to rest and that would be impossible with eight shows a week."
Goodyear left Coronation Street in 1995, before making a brief return in 2002.