You are probably talking about a mixture of Gaussians. Apart from $\sum_k z_k=1$, with an additional constraint that, each $z_k \in {0,1}$ (binary), you will have your result. Note that the two constraints imply that there is only one position out of $K$ in $\boldsymbol{z}=(z_1,\ldots,z_K)$ that is 1, the rest is 0.
To be precise, $\sum_z$ is sum of all possible $\boldsymbol{z}$ (i.e., 1 at each position). There are only $K$ possible $\boldsymbol{z}$, the sum can be written as $\sum_{k=1}^K$. The product over $K$ components, $\prod_{k=1}^K$ actually has only one multiplicand because the other $K-1$ multiplicands are raised to the power of 0.
You are probably talking about a mixture of Gaussians. Apart from $\sum_k z_k=1$, with an additional constraint that, each $z_k \in {0,1}$ (binary), you will have your result. Note that the two constraints imply that there is only one position out of $K$ in $\boldsymbol{z}=(z_1,\ldots,z_K)$ that is 1, the rest is 0.
To be precise, $\sum_z$ is sum of all possible $\boldsymbol{z}$ (i.e., 1 at each position). There are only $K$ possible $\boldsymbol{z}$, the sum can be written as $\sum_{k=1}^K$. The product over $K$ components, $\prod_{k=1}^K$ actually has only one multiplicand because the other $K-1$ multiplicands are raised to the power of 0.