This is really just a covariant decomposition of the stress-energy tensor, with aptly given names. In particular, given a normalized timelike vector field $u^\mu$ (with convention $u^\mu u_\mu = 1$), any tensor $S_{\mu\nu}$ can be decomposed as:
$$
S_{\mu\nu} = S_{\sigma\tau}u^\sigma u^\tau u_\mu u_\nu \pm h_\mu{}^\sigma S_{\sigma\tau}u^\tau u_\nu \pm h_\nu{}^\tau S_{\sigma\tau}u^\sigma u_\mu + \frac{1}{3}\mathrm{Tr}(S)h_{\mu\nu} + \Sigma(S)_{\mu\nu} + \Omega(S)_{\mu\nu},
$$
where the sign on the second and third terms depends on how you define the projection tensor ($h_{\mu\nu} = g_{\mu\nu} - u_\mu u_\nu$ yields $+$ while $h_{\mu\nu} = u_\mu u_\nu - g_{\mu\nu}$ yields $-$), and where
\begin{align}
\mathrm{Tr}(S) &= h^{\mu\nu}S_{\mu\nu}, \\
\Sigma(S)_{\mu\nu} &= h_\mu{}^{\sigma}h_\nu{}^\tau S_{(\sigma\tau)} - \frac{1}{3}\mathrm{Tr}(S)h_{\mu\nu}, \\
\Omega(S)_{\mu\nu} &= h_{\mu}{}^\sigma h_\nu{}^\tau S_{[\sigma\tau]}.
\end{align}
Above $S_{(\mu\nu)} = \frac{1}{2}(S_{\mu\nu} + S_{\nu\mu})$ and $S_{[\mu\nu]} = \frac{1}{2}(S_{\mu\nu} - S_{\nu\mu})$. Since the stress-energy tensor is symmetric, $T_{\mu\nu} = T_{(\mu\nu)}$, we have $\Omega(T) = 0$, and
$$
h_\mu{}^\sigma T_{\sigma\tau}u^\tau = h_{\mu}{}^{\tau}T_{\sigma\tau}u^{\sigma} \equiv \pm q_\mu.
$$
By letting $\pi_{\mu\nu} \equiv \Sigma(T)_{\mu\nu}$, $p \equiv \mp\frac{1}{3}\mathrm{Tr}(T)$, and $\rho \equiv T_{\sigma\tau}u^\sigma u^\tau$, we get the desired expression (there must be an error in your terms involving $q$).
The interpretation of $\rho$ as energy-density, $p$ as pressure, $q_\mu$ as heat vector (or equivalently as momentum density), and $\pi_{\mu\nu}$ as viscous shear (anisotropic stress) tensor follows from the definition of the stress-energy tensor, i.e. by defining
\begin{align}
T^{\mu\nu} &= \text{flux of the $\mathbf{e}_ \mu$-component of 4-momentum along $\mathbf{e}_\nu$}. \end{align}
Edit: If you instead use the so called spacelike sign convention, $u^\mu u_\mu = -1$, then $h_{\mu\nu} = g_{\mu\nu} + u_\mu u_\nu$ and the sign on the second and third terms become $-$, while $p \equiv \frac{1}{3}\mathrm{Tr}(T)$, and we define
$$
h_\mu{}^\sigma T_{\sigma\tau}u^\tau = h_{\mu}{}^{\tau}T_{\sigma\tau}u^{\sigma} \equiv -q_\mu.
$$