  In addition to possessing fractional statistics, anyon excitations of a 2D
topologically ordered state can realize symmetry in distinct ways , leading to
a variety of symmetry enriched topological (SET) phases. While the symmetry
fractionalization must be consistent with the fusion and braiding rules of the
anyons, not all ostensibly consistent symmetry fractionalizations can be
realized in 2D systems. Instead, certain `anomalous' SETs can only occur on the
surface of a 3D symmetry protected topological (SPT) phase. In this paper we
describe a procedure for determining whether an SET of a discrete, onsite,
unitary symmetry group $G$ is anomalous or not. The basic idea is to gauge the
symmetry and expose the anomaly as an obstruction to a consistent topological
theory combining both the original anyons and the gauge fluxes. Utilizing a
result of Etingof, Nikshych, and Ostrik, we point out that a class of
obstructions are captured by the fourth cohomology group $H^4( G, \,U(1))$,
which also precisely labels the set of 3D SPT phases, with symmetry group $G$.
We thus establish a general bulk-boundary correspondence between the anomalous
SET and the 3d bulk SPT whose surface termination realizes it. We illustrate
this idea using the chiral spin liquid ($U(1)_2$) topological order with a
reduced symmetry $\mathbb{Z}_2 \times \mathbb{Z}_2 \subset SO(3)$, which can
act on the semion quasiparticle in an anomalous way. We construct exactly
solved 3d SPT models realizing the anomalous surface terminations, and
demonstrate that they are non-trivial by computing three loop braiding
statistics. Possible extensions to anti-unitary symmetries are also discussed.
