A history of government shutdowns
Here's a look at how long federal funding gaps have lasted since 1976, according to a Congressional Research Service report from September of last year.
One important note: The report states that though a shutdown may arise from a funding gap, the two should be considered separately. In short-lived funding gaps for example, agencies may not have enough time to complete shutdown procedures. In other cases, only parts of the government that haven't been funded would shut down, while those with funding would operate normally.
Clarification: Glenn Kessler of the Washington Post notes that prior to 1980 opinions from then Attorney General Benjamin Civiletti, agencies tended to operate through periods of expired funding. So even though funding gaps lasted many days, they did not result in shutdowns.