Gauss' theorem says that if $R$ is a UFD then so is $R[t]$.
However, it is clear that in $\mathbb{Z}[\sqrt{-5}]$, there exists irreducible elements that are not prime ($x=1+\sqrt{-5}$). Since an element in a UFD is irreducible iff it is prime, we can see $\mathbb{Z}[\sqrt{-5}]$ is not a UFD - but Gauss' theorem says it is.
What am I missing here? Is there some other condition that applies to the $R$ in Gauss' theorem? How to resolve the apparent conflict? Or is there no conflict and I've misunderstood something?
Gauss's Theorem applies exclusively to the polynomial ring $R[x]$. $\mathbb{Z}[\sqrt{-5}]$ is not a polynomial ring in $\mathbb{Z}$, it's the quotient of a polynomial ring by $x^2+5$.