We present a spectroscopic study of the dynamics of the ionized and neutral gas throughout the Lagoon nebula (M8), using VLT/FLAMES data from the Gaia-ESO Survey. We explore the connections between the nebular gas and the stellar population of the associated star cluster NGC6530. We characterize through spectral fitting emission lines of H{alpha}, [NII] and [SII] doublets, [OIII], and absorption lines of sodium D doublet, using data from the FLAMES/Giraffe and UVES spectrographs, on more than 1000 sightlines towards the entire face of the Lagoon nebula. Gas temperatures are derived from line-width comparisons, densities from the [SII] doublet ratio, and ionization parameter from H{alpha}/[NII] ratio. Although doubly-peaked emission profiles are rarely found, line asymmetries often imply multiple velocity components along the same line of sight. This is especially true for the sodium absorption, and for the [OIII] lines. Spatial maps for density and ionization are derived, and compared to other known properties of the nebula and of its massive stars 9 Sgr, Herschel 36 and HD 165052 which are confirmed to provide most of the ionizing flux. The detailed velocity fields across the nebula show several expanding shells, related to the cluster NGC6530, the O stars 9 Sgr and Herschel 36, and the massive protostar M8East-IR. The origins of kinematical expansion and ionization of the NGC6530 shell appear to be different. We are able to put constrains on the line-of-sight (relative or absolute) distances between some of these objects and the molecular cloud. The large obscuring band running through the middle of the nebula is being compressed by both sides, which might explain its enhanced density. We also find an unexplained large-scale velocity gradient across the entire nebula. At larger distances, the transition from ionized to neutral gas is studied using the sodium lines.