To see the forward part (which is not the question from the title by the way..)
Suppose $G_f$ is closed and $x_n \to x$ and $f(x_n) \to y$.
Then $(x_n, f(x_n)) \to (x,y)$ and these points $(x_n, f(x_n))$ lie in $G_f$ so when $G_f$ is closed this means that their limit $(x,y) \in G_f$ as well, so $y=f(x)$ by definition. This implication holds regardless of $X$, $Y$ or whether $f$ is continuous.
For the reverse (sequence condition gives closedness of $G_f$ we need that $X \times Y$ is sequential (so certainly true when $X$ and $Y$ are metrisable):
Let's show $G_f$ is sequentially closed: let $((x_n, y_n))_n$ be a sequence of points from $G_f$ that converges to $(x,y) \in X \times Y$.
This means that $x_n \to x$ and $y_n \to y$. Being in $G_f$ means that $f(x_n) = y_n$. Now apply the right hand side sequence condition, and we get $y = f(x)$ so $(x,y) \in G_f$, and $G_f$ is (sequentially) closed. Again this holds for all $f$.
Now, if $f$ is continuous it will have $G_f$ closed ($Y$ Hausdorff is enough for this to hold) but $G_f$ closed is not enough to get continuity of $f$ as Santos' standard example of $f(x) = \frac{1}{x}$ shows.