Context. We describe the atomic and molecular data that were used for the abundance analyses of FGK-type stars carried out within the Gaia-ESO Public Spectroscopic Survey in the years 2012 to 2019. The Gaia-ESO Survey is one among several current and future stellar spectroscopic surveys producing abundances for Milky-Way stars on an industrial scale. Aims. We present an unprecedented effort to create a homogeneous common line list, which was used by several abundance analysis groups using different radiative transfer codes to calculate synthetic spectra and equivalent widths. The atomic data are accompanied by quality indicators and detailed references to the sources. The atomic and molecular data are made publicly available in electronic form. Methods. In general, experimental transition probabilities were preferred but theoretical values were also used. Astrophysical g fvalues were avoided due to the model-dependence of such a procedure. For elements whose lines are significantly affected by a hyperfine structure or isotopic splitting, a concerted effort has been made to collate the necessary data for the individual line components. Synthetic stellar spectra calculated for the Sun and Arcturus were used to assess the blending properties of the lines. We also performed a detailed investigation of available data for line broadening due to collisions with neutral hydrogen atoms. Results. Among a subset of over 1300 lines of 35 elements in the wavelength ranges from 475 nm to 685 nm and from 850 nm to 895 nm, we identified about 200 lines of 24 species which have accurate g f-values and are free of blends in the spectra of the Sun and Arcturus. For the broadening due to collisions with neutral hydrogen, we recommend data based on Anstee-Barklem-O'Mara theory, where possible. We recommend avoiding lines of neutral species for which these are not available. Theoretical broadening data by R.L. Kurucz should be used for Sc ii, Ti ii, and Y ii lines; additionally, for ionised rare-earth species, the Unsöld approximation with an enhancement factor of 1.5 for the line width can be used. Conclusions. The line list has proven to be a useful tool for abundance determinations based on the spectra obtained within the Gaia-ESO Survey, as well as other spectroscopic projects. Accuracies below 0.2 dex are regularly achieved, where part of the uncertainties are due to differences in the employed analysis methods. Desirable improvements in atomic data were identified for a number of species, most importantly Al i, S i, and Cr ii, but also Na i, Si i, Ca ii, and Ni i.