The universal property of product holds only for the product sigma-algebra Suppose $\{X_\alpha \mid \alpha \in J\}$ is a family of measurable spaces. Let X denote the Cartesian product $\prod_{\alpha \in J} X_\alpha$ and consider the natural projections $\{\pi_\alpha: X \to X_\alpha \mid \alpha \in J\}$. Given a sigma-algebra $\mathcal{A}$ on $X$, define the property $P(\mathcal{A})$ to be that for any measurable space $W$ and any function $g: W \to X$, $g$ is measurable relative to $\mathcal{A}$ iff for each $\alpha \in J$, the function $f_\alpha \circ g$ from $W$ to $X_\alpha$ is measurable.
I suspect that the property $P(\mathcal{A})$ is the universal property of the product sigma-algebra and that it holds only for the product sigma-algebra on $X$, i.e. the sigma-algebra generated by the natural projections $\{\pi_\alpha: X \to X_\alpha \mid \alpha \in J\}$. To prove that, it's enough to prove that the sigma-algebra generated by the natural projections satisfies $P$ and that any other sigma-algebra $\mathcal{A}$ that satisfies $P(\mathcal{A})$ must be at the same time finer and coarser than the one generated by the natural projections.
I am having troubles with the finer part. Can you, dear reader, prove this?
 A: I couldn't understand Mark Saving's answer but I managed to figure it out on my own. I'll use slightly different, probably better, notation than in the question.
First, a lemma we will use. Note that the variables used in this lemma are on their own and don't correspond to any variables in the question.
Lemma. If $f : X \to Y$ is a function from a measurable space $X$ to a measurable space $Y$, and the sigma-algebra of $Y$ is generated by a family $\mathcal{B}$ of subsets of $Y$ and if for each $B \in \mathcal{B}$ the preimage $f^{-1}[B]$ is measurable, then $f$ is measurable. This lemma can be proved using inductive construction of the sigma-algebra generated by a set, which is described in page 40 of "Real Analysis. Modern Techniques and Their Applications. Second Edition" by Folland 1999 and (with some typos) at https://proofwiki.org/wiki/Inductive_Construction_of_Sigma-Algebra_Generated_by_Collection_of_Subsets. I am too lazy to prove it here.
Now, the main result.
Suppose $\{X_\alpha \mid \alpha \in J\}$ is an indexed family of measurable spaces. For any measurable space $K$ with the cartesian product $\prod_{\alpha \in J} X_\alpha$ as the carrier, define the property $P(K)$, which is the universal property of the product of measurable spaces, to be "For each measurable space $W$ and function $g: W \to K$, $g$ is measurable iff for each $\alpha \in J$ the composition of the $\alpha$-th natural projection $\pi_\alpha: K \to X_\alpha$ and $g: W \to K$ (i.e. $\pi_\alpha \circ g : W \to X_\alpha$) is measurable".
Let R denote the measurable space with the carrier $\prod_{\alpha \in J} X_\alpha$ and the sigma-algebra generated by $\{\pi_\alpha \mid \alpha \in J\}$.
First we show that $P(R)$ holds. Inside the quantifier, $P(R)$ consists of a bidirectional statement. The direction from left to right can be clearly seen by unpacking the definitions. The direction from right to left follows from the lemma given above.
Now, suppose $M$ is another measurable space with the same carrier $\prod_{\alpha \in J} X_\alpha$ such that $P(M)$ holds. We want to show that $M$ has the same sigma-algebra as $R$. We do that by showing that the sigma-algebra of $M$ is both coarser and finer than that of $R$.
To show that $M$ is coarser than $R$, it's enough to show that $\operatorname{id} : R \to M$ is measurable. Since $P(M)$ holds, choosing $R$ as $W$ and $\operatorname{id}: R \to M$ as $g$ in the text of the property $P(M)$ gives us that to show that $\operatorname{id} : R \to M$ is measurable it's enough to show that, for each $\alpha \in J$, the natural projection $\pi_\alpha : R \to X_\alpha$ is measurable. But that is true by the definition of $R$. So indeed, $M$ is coarser than $R$.
Now we will show that $M$ is finer than $R$ by contraposition. Taking $M$ as $W$ and $\operatorname{id}: M \to M$ as $g$ in the text of $P(M)$ will witness that $M$ is finer than $R$, as we will now show. Since $\operatorname{id}: M \to M$ is measurable, by $P(M)$, for each $\alpha \in J$, the natural projection $\pi_\alpha: M \to X_\alpha$ is measurable. This implies that $M$ contains every member of the generating set of the sigma-algebra of $R$, so $M$ is indeed finer than $R$.
A: This is indeed the universal property of the product.
Consider the definition of the universal property of the product: $\DeclareMathOperator{Hom}{Hom}$

Definition: Consider a category $C$. Consider a set $J$, and suppose we have a family of objects $\{X_\alpha\}_{\alpha \in J}$ in $C$. Consider some object $P$ and some family of morphisms $\{p_\alpha \in \Hom_C(P, X_\alpha)\}_{\alpha \in J}$. Then $(P, p)$ is said to satisfy the universal property of the product with respect to $X$ if and only if for all objects $A$ and all families of morphisms $\{a_\alpha \in \Hom_C(A, X_\alpha)\}_{\alpha \in J}$, there is a unique map $a \in \Hom_C(A, P)$ such that for all $\alpha \in J$, $a_\alpha = p_\alpha \circ a$.

Consider the following two theorems:

Theorem: Consider a family of sets $\{X_\alpha\}_{\alpha \in J}$. Then $(\prod\limits_{\alpha \in J} X_\alpha, \{\pi_\alpha : (\prod\limits_{\beta \in J} X_\beta) \to X_\alpha\}_{\alpha \in J})$ satisfies the universal property of the product (in the category of sets). In other words, for all sets $A$ and all families of functions $\{a_\alpha : A \to X_\alpha\}_{\alpha \in J}$, there is a unique function $a : A \to \prod\limits_{\alpha \in J} X_\alpha$ such that for all $\alpha \in J$, $a_\alpha = \pi_\alpha \circ a$. $\square$


Theorem: Consider a family of measurable spaces $\{X_\alpha\}_{\alpha \in J}$. Then let $P$ be the product $\sigma$-algebra on $\prod\limits_{\alpha \in J} X_\alpha$; abusively write $\prod\limits_{\alpha \in J} X_\alpha = (\prod\limits_{\alpha \in J} X_\alpha, P)$. Then $\prod\limits_{\alpha \in J} X_\alpha$, together with the maps $\{\pi_\alpha\}_{\alpha \in J}$, satisfy the universal property of the product (in the category of measurable spaces). In other words, all the $\pi_\alpha$ are measurable maps, and furthermore, for all measure spaces $A$ and all families of measurable functions $\{a_\alpha : A \to X_\alpha\}_{\alpha \in J}$, there is a unique measurable function $a : A \to \prod\limits_{\alpha \in J} X_\alpha$ such that for all $\alpha \in J$, $a_\alpha = \pi_\alpha \circ a$. $\square$

Now, we can state the following theorem:

Thm. Let $P(\mathcal{A})$ if and only if the measure space $(\prod\limits_{\alpha \in H} A_\alpha, \mathcal{A})$, together with the maps $\{\pi_\alpha\}_{\alpha \in J}$, satisfy the universal property of the product.

Proof: Suppose the $\sigma$-algebra satisfies $P(\mathcal{A})$.
Note that since the identity map $1_{\prod\limits_{\alpha \in J} X_\alpha} : \prod\limits_{\alpha \in J} X_\alpha \to \prod\limits_{\alpha \in J} X_\alpha$ is measurable, each of the $\pi_\alpha$ is measurable, since $\pi_\alpha = \pi_\alpha \circ 1_{\prod\limits_{\alpha \in J} X_\alpha}$ is measurable by $P(\mathcal{A})$.
Suppose we have measurable functions $\{g_\alpha : W \to X_\alpha\}_{\alpha \in J}$. Then by the universal property of the product in the category of sets, there is a unique function $g : W \to X$ such that $\forall \alpha, \pi_\alpha \circ g = g_\alpha$. Then $g$ is measurable by $P(\mathcal{A})$. So the universal property of the product is satisfied.
Conversely, suppose the universal property of the product is satisfied. Suppose that for all $\alpha$, $\pi_\alpha \circ g$ is measurable. Consider the unique measurable function $h : W \to X$ such that for all $\alpha$, $\pi_\alpha \circ g = \pi_\alpha \circ h$. Therefore, $g = h$ by the universal property of the product of sets. Since $h$ is measurable and $h = g$, $g$ is measurable. Conversely, if $g$ is measurable, then for all $\alpha$, $\pi_\alpha \circ g$ is measurable, since the composition of measurable functions is measurable. $\square$
To finish the proof, note that the product $\sigma$-algebra $W$ clearly satisfies $P(W)$.
Now suppose we have two $\sigma$-algebras $W, Z$ on $\prod\limits_{\alpha \in J} X_\alpha$ which both satisfied $P(-)$, then consider the two measurable spaces $M = (\prod\limits_{\alpha \in J} X_\alpha, W)$ and $N = (\prod\limits_{\alpha \in J} X_\alpha, Z)$. Note that the identity maps $M \to N$ and $N \to M$ must both be measurable. Therefore, $W = Z$.
