Exclusive production of dielectron pairs, γγ → e + e −, is studied using Lint = 1.72 nb−1 of data from ultraperipheral collisions of lead nuclei at sNN = 5.02 TeV recorded by the ATLAS detector at the LHC. The process of interest proceeds via photon–photon interactions in the strong electromagnetic fields of relativistic lead nuclei. Dielectron production is measured in the fiducial region defined by following requirements: electron transverse momentum pTe > 2.5 GeV, absolute electron pseudorapidity |η e | < 2.5, dielectron invariant mass mee > 5 GeV, and dielectron transverse momentum pTee < 2 GeV. Differential cross-sections are measured as a function of mee, average pTe , absolute dielectron rapidity |yee|, and scattering angle in the dielectron rest frame, |cos θ *|, in the inclusive sample, and also with a requirement of no activity in the forward direction. The total integrated fiducial cross-section is measured to be 215±1(stat.)−20+23(syst.)±4(lumi.) μb. Within experimental uncertainties the measured integrated cross-section is in good agreement with the QED predictions from the Monte Carlo programs Starlight and SuperChic, confirming the broad features of the initial photon fluxes. The differential cross-sections show systematic differences from these predictions which are more pronounced at high |yee | and |cos θ * | values. [Figure not available: see fulltext.].