  We calculate the gluonic massive operator matrix elements in the unpolarized
and polarized cases, $A_{gg,Q}(x,\mu^2)$ and $\Delta A_{gg,Q}(x,\mu^2)$, at
three-loop order for a single mass. These quantities contribute to the matching
of the gluon distribution in the variable flavor number scheme. The polarized
operator matrix element is calculated in the Larin scheme. These operator
matrix elements contain finite binomial and inverse binomial sums in Mellin
$N$-space and iterated integrals over square root-valued alphabets in momentum
fraction $x$-space. We derive the necessary analytic relations for the analytic
continuation of these quantities from the even or odd Mellin moments into the
complex plane, present analytic expressions in momentum fraction $x$-space and
derive numerical results. The present results complete the gluon transition
matrix elements both of the single- and double-mass variable flavor number
scheme to three-loop order.
