Résumé : Context. The Gaia-ESO Survey (GES) is a large public spectroscopic survey that was carried out using the multi-object FLAMES spectrograph at the Very Large Telescope. The survey provides accurate radial velocities, stellar parameters, and elemental abundances for ~115 000 stars in all Milky Way components. Aims. In this paper, we describe the method adopted in the final data release to derive lithium equivalent widths (EWs) and abundances. Methods. Lithium EWs were measured using two different approaches for FGK and M-type stars, to account for the intrinsic differences in the spectra. For FGK stars, we fitted the lithium line using Gaussian components, while direct integration over a predefined interval was adopted for M-type stars. Care was taken to ensure continuity between the two regimes. Abundances were derived using a new set of homogeneous curves of growth that were derived specifically for GES, and which were measured on a synthetic spectral grid consistently with the way the EWs were measured. The derived abundances were validated by comparison with those measured by other analysis groups using different methods. Results. Lithium EWs were measured for ~40 000 stars, and abundances could be derived for ~38 000 of them. The vast majority of the measures (80%) have been obtained for stars in open cluster fields. The remaining objects are stars in globular clusters, or field stars in the Milky Way disc, bulge, and halo. Conclusions. The GES dataset of homogeneous lithium abundances described here will be valuable for our understanding of several processes, from stellar evolution and internal mixing in stars at different evolutionary stages to Galactic evolution.