The theorems are related but I don't think there is a simple way to derive one from the other.
Both Gauss' generalization, and the classification of moduli with primitive roots, are 'shadows' of the structural theory of the finite abelian group $G_m:=(\mathbb{Z}/m\mathbb{Z})^{\times}$. Gauss' generalization computes the product of elements in $G_m$, while the classification tells us whether $G_m$ is cyclic. If you know the structure of $G_m$, that is, if you have an isomorphism $G_m \cong \bigoplus_i \mathbb{Z}/a_i \mathbb{Z}$, it is easy to both compute the product of elements in $G_m$ and to answer whether $G_m$ is cyclic.
The reason for the similarity between the answers is the following group version of Gauss' result: suppose $G$ is a finite abelian group. If $G$ has a unique element of order $2$, call it $a$, then the product of elements in $G$ is $a$. Otherwise, the product is the identity element $e$. So without any number theory (only group theory) we know that $\prod_{k \in G_m} k$ is not congruent to $1 \bmod m$ if and only if $G_m$ has a unique element of order $2$. Gauss' result implies a classification of $m$ for which $G_m$ has a unique element of order $2$.
What's the relationship between have a unique element of order $2$ and being cyclic? Well, in the case of the groups $G_m$, they always have even order (unless $m=2$); that's a number theory phenomenon. A cyclic group of even order has a unique element of order $2$, so Gauss' generalization sees the moduli that have primitive roots. Why doesn't it see other moduli? In general, a finite abelian group $G$ of even order can have a unique element of order $2$ while not being cyclic. Such groups are given by $\mathbb{Z}/2^m \mathbb{Z} \oplus A$ where $A$ is a non-cyclic group of odd order. The groups $G_m$ cannot look like that, though, and I do not know how to show it without developing at least most of the structural theory of $G_m$.