We evaluate the two-loop amplitude for Higgs boson production in gluon fusion via a massive quark. We also present for the first time the two-loop amplitude for gg -> h via a massive squark.