  Interlayer coupling can significantly influence the physical properties of
layered transition metal compounds. The superconductivity in layered Mo$_2$C
systems, belonging to the emergent family of MXene, has garnered considerable
attention. However, the impact of interlayer coupling on superconductivity, and
the anisotropic superconducting properties in these systems are not yet clear.
By performing first-principles calculations of electron-phonon coupling and
anisotropic superconducting properties, we show that the interlayer coupling in
bilayer 1$T$-Mo$_2$C suppresses superconductivity, resulting in a significant
drop in superconducting transition temperature ($T_{\mathrm{c}}$) from 4.2 $K$
in its monolayer form to nearly 0 $K$. By introducing lithium atoms into the
interlayer space of the bilayer, the interlayer coupling can be effectively
weakened, transforming the system into a two-gap superconductor with a
$T_{\mathrm{c}}$ above 10 $K$. A 3\% tensile strain can further transform the
system into a three-gap superconductor with a significantly enhanced
$T_{\mathrm{c}}$ of approximately 24.7 $K$, which is very high in the Mo$_2$C
related systems. The enhancement of the superconductivity induced by the strain
is mainly due to the downshift of an energy band with a flat dispersion to the
energy near the Fermi level. The in-plane vibrations of Mo atoms and the
$d$-orbital electrons of Mo atoms are most important for the formation of the
superconductivity. Our method can also be applied to multilayer Mo$_2$C
systems. Given the successful synthesis of layered Mo$_2$C systems and the
experimental realization of alkaline metal atom depositions, our work presents
a practically feasible strategy for achieving high $T_{\mathrm{c}}$ and
multigap superconductivity in layered Mo$_2$C.
