Measurements of the top quark polarization and top quark pair (tt) spin correlations are presented using events containing two oppositely charged leptons (e+e-, e±μ or μ+μ-) produced in proton-proton collisions at a center-of-mass energy of 13 TeV. The data were recorded by the CMS experiment at the LHC in 2016 and correspond to an integrated luminosity of 35.9 fb-1. A set of parton-level normalized differential cross sections, sensitive to each of the independent coefficients of the spin-dependent parts of the tt production density matrix, is measured for the first time at 13 TeV. The measured distributions and extracted coefficients are compared with standard model predictions from simulations at next-to-leading-order (NLO) accuracy in quantum chromodynamics (QCD), and from NLO QCD calculations including electroweak corrections. All measurements are found to be consistent with the expectations of the standard model. The normalized differential cross sections are used in fits to constrain the anomalous chromomagnetic and chromoelectric dipole moments of the top quark to -0.24<CtG/Λ2<0.07 TeV-2 and -0.33<CtGI/Λ2<0.20 TeV-2, respectively, at the 95% confidence level.