Almost, but when learning topology, better try to understand what is purely topological and what proper to metric spaces. Here, what you want to prove is not proper at all to metric spaces, nor to the fact that $\mathbf{R}$'s addition $(x,y)\mapsto x+y$ is continuous, but is proper to continuous maps with Hausdorff target. I will give a proof emphasizing this.
So let's show that $G$ is closed in $\mathbf{R}\times \mathbf{R}$ and to do it, let' show that its complement is open, so let $(x,y)\in \mathbf{R}\times \mathbf{R} \backslash G$. Since $(x,y)\not\in G$, we have $y\not=f(x)$. As $\mathbf{R}$ is Hausdorff (being a metric space, yes) there are disjoint open sets $U$ and $V$ in $\mathbf{R}$ such that $y\in U$ and $f(x)\in V$. Finally, $f$ is continuous, so there is an open neighbourhood $W$ of $x$ such that $f(W])\subseteq V$. By definition of the product topology, $W\times U$ is an open neighbourhood of $(x,y)$ in $\mathbf{R}\times\mathbf{R}$ and this neighbourhood is disjoint from $G$. Let $(z,f(z))$ be any point of $G$. If $z\not\in W$, then clearly $(z,f(z))\not\in W\times U$. If $z\in W$, then $f(z)\in V$, so $f(z)\not\in U$, and therefore $(z,f(z))\not\in W\times U$. So $(z,f(z))\notin W\times U$, and it follows that $(W\times U)\cap G=\varnothing$. Our open neighbourhood $W\times U$ lies in the complement of $G$. When have just show that every point of the complement of $G$ is in the interior of the complement of $G$, and this means that this complement is open.
Remark 1. Replacing the source $\mathbf{R}$ by any topological space $X$ and the target $\mathbf{R}$ by any Hausdorff topological space $Y$, the same proof as above shows that any continuous map $f : X \to Y$ from a topological space to an Hausdorff topological space has a closed graph.
Remark 2. There are counter-examples to the closedness of the graph is $Y$ is not Hausdorff. ;-)
Remark 3. If you want to give a proof using that $f$ continuous implies that the inverse image of a closed set in $Y$ is closed in $X$, do like this : as $Y$ is Hausdorff, $\Delta = \{(y,y)\;|\;y\in Y\}$ is closed in $Y\times Y$ (same style of proof as the proof I gave above) and now $G = (f\times \textrm{Id})^{-1}(\Delta)$ is closed, as $\Delta$ is and as $f\times \textrm{Id} : X\times Y\to Y\times Y$ defined by $(x,y)\mapsto (f(x),y)$ is continuous.