Early infections have been suggested to be associated with increased risk for later celiac disease (CD). We analyzed prospective claims data of n = 295,420 infants from Bavaria, Germany, born between 2005 and 2007 containing information on medically attended infectious diseases according to ICD-10 code on a quarterly basis to calculate hazard ratios and 95% confidence intervals of time to CD diagnosis by infection exposure, adjusting for sex, calendar month of birth and number of previous healthcare visits. CD risk was increased in children who had a gastrointestinal infection during the first year of life (hazard ratio = 1.32, 95% confidence interval: 1.12, 1.55) and to a lesser extent also in children with a respiratory infection during the first year (hazard ratio = 1.22, 95% confidence interval: 1.04, 1.43). Repeated gastrointestinal infections during the first year of life were associated with particularly increased CD risk in later life. These findings indicate that early gastrointestinal infections may be relevant for CD development.