We calculate the next-to-next-to-leading order ${cal O}(alpha_s^4)$ one-loop squared corrections to the production of heavy-quark pairs in the gluon-gluon fusion process. Together with the previously derived results on the $q bar{q}$ production channel the results of this paper complete the calculation of the one-loop squared contributions of the next-to-next-to-leading order ${cal O}(alpha_s^4)$ radiative QCD corrections to the hadroproduction of heavy flavors. Our results, with the full mass dependence retained, are presented in a closed and very compact form, in dimensional regularization.