Take outside the graph of a function, so . Since is a Hausdorff space, choose disjoint open neighborhoods of and of . Continuity makes an open neighborhood of . The product neighborhood contains and cannot meet the graph, because every with belongs to . The complement is therefore open in the product topology, proving
This is the closed graph of a map into a Hausdorff space property; no separation assumption on is required.