  We study the relaxation dynamics of the spin polarization of baryons (nucleon
and $\Lambda$-baryon), in a thermal pion gas as a simple model of the hadronic
phase of the QCD plasma produced in relativistic heavy-ion collisions. For this
purpose, we formulate the quantum kinetic theory for the spin density matrix of
baryons in the leading order of the gradient expansion. Considering the
baryon-pion elastic scattering processes as the dominant interaction between
baryons and thermal pions, we compute the spin relaxation rate of nucleons and
$\Lambda$-baryons in a pion gas up to temperature 200 MeV. In the case of
nucleons, we evaluate the spin relaxation rate in the $s$-channel resonance
approximation, based on the known experimental data on $\Delta$-resonances. We
also estimate the spin relaxation rate for $\Lambda$-baryons, based on
experimental inputs and theoretical models for the low-energy $\Lambda$$\pi$
scattering, including the chiral perturbation theory.
