If $f,g:X \to Y$ are measurable, is the set on which $f=g$ measurable? What $Y$ does this hold for? If $f,g:(X,\Sigma_X) \to (Y,\Sigma_Y)$ are measurable, when can we conclude that $\{x \in X: f(x)=g(x)\} \in \Sigma_X$ is a measurable subset of $X$? This is a standard theorem when $Y=\mathbb{R}$ or more generally when $Y$ is a standard measure space (isomorphic to $(F, \mathcal{B}(F))$ for some Borel $F \subseteq \mathbb{R}$). Does this fact hold when $Y$ is any measure space? If no, what is needed to conclude this set is measurable?
 A: Let $E = \{x \in X : f(x) = g(x)\}$.
Here's a counterexample that shows that $E$ may not always be measurable: suppose $X = Y = \{a,b\}$. Let the sigma algebra be $\Sigma_X = \{\varnothing,X\}$ for both the domain and the codomain. Then define $f:X\rightarrow X$, $g:X\rightarrow X$ by:
$$\begin{align*}
f(a) &= a\\
f(b) &= b\\
g(a) &= a\\
g(b) &= a\\
\end{align*}$$
These functions are trivially measurable. (Every function into an indiscrete measureable space is measurable.) But the functions agree only at $a$, so the equalizer is $$E = \{a\},$$
which is not a measurable subset of $X$.

Here's a sufficient (but not necessary) condition for $E$ to be measurable. We know that we can write $$E = \bigcup_{y \in Y} \; f^{-1}(\{y\}) \cap g^{-1}(\{y\}).$$
We know that if $Y$ is countable and the inverse images of singletons in $Y$ are all measurable, then $E$ is measurable.
A: Continuing @Greg Martin's suggestion, let $F:X \to Y\times Y$ defined by $F(x) = (f(x),g(x))$. Then $F$ is measurable since $f,g$ are.
Moreover, the set $\{x \in X: f(x) = g(x)\} = F^{-1}(\Delta)$ where $\Delta:= \{(y_1,y_2) \in Y \times Y : y_1=y_2\}$ is the diagonal of $Y$.
Thus, it suffices to find when $\Delta$ is measurable.
Assume that $(Y,\tau)$ is a topological space and that $\Sigma_Y=\mathcal{B}(\tau)$ is the Borel $\sigma$-algebra. Then $\Delta$ is measurable if and only if there is a perhaps coarser topology $\tau' \subseteq \tau$ such that $(Y,\tau')$ is second countable and $T_0$. I will only show the direction that shows $\Delta$ is measurable, as knowing when $\Delta$ is not measurable doesn't necessarily tell us when $F^{-1}(\Delta)$ is not measurable. That is, this only gives us a sufficient condition.
Suppose $(Y,\tau')$ as above is second countable (with base $U_1,U_2,\ldots$) and $T_0$.
For $y_1,y_2 \in Y$ we note that $y_1= y_2$ iff every $i$ is such that $U_i$ contains either both or neither of $y_1,y_2$. Thus 
$$\Delta=\bigcap_{i=1}^\infty (U_i\times U_i) \cup (U_i^c \times U_i^c)$$
is measurable.
