The comedian was forced to delay the filming of Channel 4 comedy Derek after experiencing abdominal pains, reports The Sun.
A doctor was called to the set on Thursday (August 30), and Gervais was later taken to hospital.
He was later diagnosed with having gastric flu after blood and urine tests were taken.
Gervais later said: "In some scenes Derek will look a little paler and sweatier than usual."
The actor recently hinted that he may bring back his character David Brent during the final season of the American version of The Office.
Derek was commissioned for a full series by Channel 4 back in May after airing a pilot episode in April.