The $pi^0$ pole constitutes the lowest-lying singularity of the hadronic light-by-light (HLbL) tensor, and thus provides the leading contribution in a dispersive approach to HLbL scattering in the anomalous magnetic moment of the muon $(g-2)_mu$. It is unambiguously defined in terms of the doubly-virtual pion transition form factor, which in principle can be accessed in its entirety by experiment. We demonstrate that, in the absence of a direct measurement, the full space-like doubly-virtual form factor can be reconstructed very accurately based on existing data for $e^+e^-to 3pi$, $e^+e^-to e^+e^-pi^0$, and the $pi^0togammagamma$ decay width. We derive a representation that incorporates all the low-lying singularities of the form factor, matches correctly onto the asymptotic behavior expected from perturbative QCD, and is suitable for the evaluation of the $(g-2)_mu$ loop integral. The resulting value, $a_mu^{pi^0text{-pole}}=62.6^{+3.0}_{-2.5}times 10^{-11}$, for the first time, represents a complete data-driven determination of the pion-pole contribution with fully controlled uncertainty estimates. In particular, we show that already improved singly-virtual measurements alone would allow one to further reduce the uncertainty in $a_mu^{pi^0text{-pole}}$.