Numerical simulations predict that metal-poor gas accretion from the cosmic web fuels the formation of disk galaxies. This paper discusses how cosmic gas accretion controls star formation, and summarizes the physical properties expected for the cosmic gas accreted by galaxies. The paper also collects observational evidence for gas accretion sustaining star formation. It reviews evidence inferred from neutral and ionized hydrogen, as well as from stars. A number of properties characterizing large samples of star-forming galaxies can be explained by metal-poor gas accretion, in particular, the relationship among stellar mass, metallicity, and star-formation rate (the so-called fundamental metallicity relationship). They are put forward and analyzed. Theory predicts gas accretion to be particularly important at high redshift, so indications based on distant objects are reviewed, including the global star-formation history of the universe, and the gas around galaxies as inferred from absorption features in the spectra of background sources. © The Author(s) 2014.