This is the user documentation of Gaia Data Release 2 (Gaia DR2; click here for the full pdf version of this documentation). This documentation has been prepared as background information to the Gaia papers in the Special Issue of A&A that accompanies Gaia DR2, as summarised in the Credit and citation instructions of this documentation. Gaia Collaboration et al. (2016) describes the Gaia mission. Gaia Collaboration et al. (2018b) provides an overview of the contents of Gaia DR2 and a guide for the use of the data. Detailed guidelines for how to deal with parallaxes are given by Luri et al. (2018). Arenou et al. (2018) describes the overall validation of the data. The data itself, as well as services such as cross-matches (Marrese et al. 2019) and visualisation tools (Moitinho et al. 2018), are available from the Gaia Archive at https://archives.esac.esa.int/gaia. The Gaia DR2 data model is described in Chapter 14 of this documentation. The Gaia mission home page is https://www.cosmos.esa.int/gaia/. Further, detailed information on the Gaia mission, the spacecraft, its operations, the science data, its processing, and the validation of the processed products are described in this documentation.