BACKGROUND: Children born preterm (<37 completed weeks' gestation) have a higher risk of infection-related morbidity than those born at term. However, few large, population-based studies have investigated the risk of infection in childhood across the full spectrum of gestational age. The objectives of this study were to explore the association between gestational age at birth and infection-related hospital admissions up to the age of 10 years, how infection-related hospital admission rates change throughout childhood, and whether being born small for gestational age (SGA) modifies this relationship. METHODS AND FINDINGS: Using a population-based, record-linkage cohort study design, birth registrations, birth notifications and hospital admissions were linked using a deterministic algorithm. The study population included all live, singleton births occurring in NHS hospitals in England from January 2005 to December 2006 (n = 1,018,136). The primary outcome was all infection-related inpatient hospital admissions from birth to 10 years of age, death or study end (March 2015). The secondary outcome was the type of infection-related hospital admission, grouped into broad categories. Generalised estimating equations were used to estimate adjusted rate ratios (aRRs) with 95% confidence intervals (CIs) for each gestational age category (<28, 28-29, 30-31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41 and 42 weeks) and the models were repeated by age at admission (<1, 1-2, 3-4, 5-6, and 7-10 years). An interaction term was included in the model to test whether SGA status modified the relationship between gestational age and infection-related hospital admissions. Gestational age was strongly associated with rates of infection-related hospital admissions throughout childhood. Whilst the relationship attenuated over time, at 7-10 years of age those born before 40 weeks gestation were still significantly higher in comparison to those born at 40 weeks. Children born <28 weeks had an aRR of 6.53 (5.91-7.22) during infancy, declining to 3.16 (2.50-3.99) at ages 7-10 years, in comparison to those born at 40 weeks; whilst in children born at 38 weeks, the aRRs were 1·24 (1.21-1.27) and 1·18 (1.13-1.23), during infancy and aged 7-10 years, respectively. SGA status modified the effect of gestational age (interaction P<0.0001), with the highest rate among the children born at <28 weeks and SGA. Finally, study findings indicated that the associations with gestational age varied by subgroup of infection. Whilst upper respiratory tract infections were the most common type of infection experienced by children in this cohort, lower respiratory tract infections (LRTIs) (<28 weeks, aRR = 10.61(9.55-11.79)) and invasive bacterial infections (<28 weeks, aRR = 6.02 (4.56-7.95)) were the most strongly associated with gestational age at birth. Of LRTIs experienced, bronchiolitis (<28 weeks, aRR = 11.86 (10.20-13.80)), and pneumonia (<28 weeks, aRR = 9.49 (7.95-11.32)) were the most common causes. CONCLUSIONS: Gestational age at birth was strongly associated with rates of infection-related hospital admissions during childhood and even children born a few weeks early remained at higher risk at 7-10 years of age. There was variation between clinical subgroups in the strength of relationships with gestational age. Effective infection prevention strategies should include focus on reducing the number and severity of LRTIs during early childhood.