I will try to give an answer following the Lemma that andybenji mentioned.
Let $f = f_1^{e_1} \cdots f_r^{e_r}$ be the factorization of $f$ into irreducible polynomials $f_i \in k[X,Y]$. Then
$$
S:= \{(x,y) \in k^2 \, : \, f(x,y) = g(x,y) = 0\} \subset \bigcup_{i=1}^r{\{(x,y) \in k^2 \, : \, f_i(x,y) = g(x,y) = 0\}}\,.
$$
It suffices to show that each set of the union on the right is finite. So we can from now on assume that $f$ is irreducible and that $f$ does not divide $g$.
$f$ has positive degree in at least one variable. Without loss of generality assume that $f$ has positive degree in $Y$. We now view the polynomial ring $k[X][Y]$ embedded in the polynomial ring and principal ideal domain $k(X)[Y]$.
In this ring, $f$ does still not divide $g$, I claim. Because if there was some $h \in k(X)[Y]$ so that $fh = g$ then we could clear the denominators of $h$ to obtain a relation $f \tilde{h} = g u$ where $\tilde{h} \in k[X,Y]$ and $u \in k[X]$. But since $f$ does not divide $g$, and $f$ is irreducible, $f$ must divide $u$. This is however impossible since $f$ has positive degree in $Y$ but $u$ hasn't. A similar argument shows that $f$ is still irreducible in $k(X)[Y]$.
This implies that $f$ and $g$ are coprime in $k(X)[Y]$ so we can choose polynomials $h_1, h_2 \in k(X)[Y]$ such that $fh_1 + gh_2 = 1$. Clearing denominators, we find that
$f \tilde{h_1} + g \tilde{h_2} = u$ for some $u \in k[X]$ and $\tilde{h}_i \in k[X,Y]$.
Let now $(x,y) \in S$. Then $u(x) = 0$, so there are only finitely many possible values for $x$, say $x_1, \dots, x_m$. For every $i \in \{1, \dots, m\}$, the right hand side of the equation
$$
f(x_i, Y) \tilde{h}_1(x_i,Y) + g(x_i, Y) \tilde{h}_2(x_i,Y) = u(x_i) = 0
$$
is a nonzero polynomial in $k[Y]$, because if it were zero, then $f(X,Y)$ would be divisible by $X-x_i$. It follows that for every fixed $x_i$ there are only finitely many $y \in k$ such that $(x_i,y) \in S$ and hence $S$ is finite.
By the way, the statement remains true for finite fields (either by virtue of this proof or by using the fact that if $k$ is finite, then $k^2$ is finite).