  We present the two-loop virtual QCD corrections to the production of heavy
quarks in gluon fusion. The results are exact in the limit when all kinematical
invariants are large compared to the mass of the heavy quark up to terms
suppressed by powers of the heavy-quark mass. Our derivation uses a simple
relation between massless and massive QCD scattering amplitudes as well as a
direct calculation of the massive amplitude at two loops. The results presented
here together with those obtained previously for quark-quark scattering form
important parts of the next-to-next-to-leading order QCD corrections to
heavy-quark production in hadron-hadron collisions.
