We present the fourth Fermi Large Area Telescope catalog (4FGL) of gamma-ray sources. Based on the first eight years of science data from the Fermi Gamma-ray Space Telescope mission in the energy range from 50 MeV to 1 TeV, it is the deepest yet in this energy range. Relative to the 3FGL catalog, the 4FGL catalog has twice as much exposure as well as a number of analysis improvements, including an updated model for the Galactic diffuse gamma-ray emission, and two sets of light curves (1-year and 2-month intervals). The 4FGL catalog includes 5064 sources above 4 sigma significance, for which we provide localization and spectral properties. Seventy-five sources are modeled explicitly as spatially extended, and overall 358 sources are considered as identified based on angular extent, periodicity or correlated variability observed at other wavelengths. For 1336 sources we have not found plausible counterparts at other wavelengths. More than 3130 of the identified or associated sources are active galaxies of the blazar class, and 239 are pulsars.