  We use neutron polarization analysis to study temperature dependence of the
spin excitation anisotropy in BaFe$_2$As$_2$, which has a
tetragonal-to-orthorhombic structural distortion at $T_s$ and antiferromagnetic
(AF) phase transition at $T_N$ with ordered moments along the orthorhombic
$a$-axis below $T_s\approx T_N\approx 136$ K. In the paramagnetic tetragonal
state at 160 K, spin excitations are isotropic in spin space with
$M_a=M_b=M_c$, where $M_a$, $M_b$, and $M_c$ are spin excitations polarized
along the $a$, $b$, and $c$-axis directions of the orthorhombic lattice,
respectively. On cooling towards $T_N$, significant spin excitation anisotropy
with $M_a>M_b\approx M_c$ develops below 3 meV with a diverging $M_a$ at $T_N$.
The in-plane spin excitation anisotropy in the tetragonal phase of
BaFe$_2$As$_2$ is similar to those seen in the tetragonal phase of its electron
and hole-doped superconductors, suggesting that spin excitation anisotropy is a
direct probe of doping dependence of spin-orbit coupling and its connection to
superconductivity in iron pnictides.
