Proof. First, some preliminaries: Recall that the
diagonal map

is defined as

. Also recall that in a
topology generated by a basis (like the product topology), a set

is
open if and only if, for every
point 
, there's a basis element

with

. Basis elements for

have the form

where

are
open sets in

.
Now, suppose that
is Hausdorff. We'd like to show its image under
is closed. We can do that by showing that its complement
is open.
consists of points with equal coordinates, so
consists of points
with
and
distinct.
For any
, the Hausdorff condition gives us disjoint open
with
. Then
is a basis element containing
.
and
have no points in common, so
contains nothing in the image of the diagonal map:
is contained in
. So
is open, making
closed.
Now let's suppose
is closed. Then
is open. Given any
, there's a basis element
with
.
lying in
implies that
and
are disjoint.
If we have
in
, then
is in
. The basis element containing
gives us open, disjoint
with
.
is Hausdorff, just like we wanted. 