We compute the contributions to continuum photon pair production at hadron colliders from processes initiated by gluon-gluon and gluon-quark scattering into two photons through a four-leg virtual quark loop. Complete two-loop cross sections in perturbative quantum chromodynamics are combined with contributions from soft parton radiation resummed to all orders in the strong coupling strength. The structure of the resummed cross section is examined in detail, including a new type of collinear singularity affecting azimuthal angle distributions of photons in the pair's rest frame. As a result of this analysis, we predict diphoton transverse momentum distributions in Higgs boson searches at the Tevatron and LHC.