Exclusive dimuon production in ultraperipheral collisions (UPC), resulting from photon-photon interactions in the strong electromagnetic fields of colliding high-energy lead nuclei, PbPb(γγ) → μ+μ-(Pb(∗)Pb(∗)), is studied using Lint = 0.48 nb-1 of √sNN = 5.02 TeV lead-lead collision data at the LHC with the ATLAS detector. Dimuon pairs are measured in the fiducial region pT,μ > 4 GeV, |ημ| < 2.4, invariant mass mμμ > 10 GeV, and pT,μμ < 2 GeV. The primary background from single-dissociative processes is extracted from the data using a template fitting technique. Differential cross sections are presented as a function of mμμ, absolute pair rapidity (|yμμ|), scattering angle in the dimuon rest frame (|cos $μμ∗|), and the colliding photon energies. The total cross section of the UPC γγ → μ+μ- process in the fiducial volume is measured to be σfidμμ = 34.1±0.3(stat.)±0.7(syst.) μb. Generally good agreement is found with calculations from STARlight, which incorporate the leading-order Breit-Wheeler process with no final-state effects, albeit differences between the measurements and theoretical expectations are observed. In particular, the measured cross sections at larger |yμμ| are found to be about 10-20% larger in data than in the calculations, suggesting the presence of larger fluxes of photons in the initial state. Modification of the dimuon cross sections in the presence of forward and/or backward neutron production is also studied and is found to be associated with a harder incoming photon spectrum, consistent with expectations.