The Einstein-Hilbert action on a manifold $M$ with boundary is
$$\frac{-1}{16\pi G}\int_M d^n x \sqrt{-g} R +\frac{1}{8\pi G} \int_{\partial M} d^{n-1}x \sqrt{|h|} K$$
where $K$ is the extrinsic curvature of $\partial M$ in the induced metric $h$. The Gibbons-Hawking boundary term is often justified by the fact that varying $g_{\mu\nu}\to g_{\mu\nu} + \delta g_{\mu\nu}$ would only give us the Einstein equation up to an annoying boundary term in its absence.
This is reminiscent of the anomaly inflow mechanism. For instance, Chern-Simons on an odd-d manifold $M$ with boundary is gauge anomaly free only if there is a chiral fermion living on $\partial M$. In another example, 11d M-theory on $M$ is only gauge + gravitational anomaly free if an $E_8$ supergauge theory lives on $\partial M$ (known as Horava-Witten theory).
The last example includes gravity, so this motivates my question: can the Gibbons-Hawking boundary term be framed as an anomaly cancellation mechanism? If so, which anomaly?
(Anyone who knows more about Horava-Witten theory: is there an answer in this special case, and does it generalize?)