You can show this two definitions are equivalent using the Gauss integral definition of the linking number:
Proposition. Suppose $\gamma^1,\gamma^2:S^1\rightarrow\mathbb R^3$ are two oriented smooth embeddings with disjoint images. Then the degree of the map $F:S^1\times S^1\rightarrow S^2$ given by $(s,t)\mapsto (\gamma^1(s)-\gamma^2(t))\cdot||\gamma^1(s)-\gamma^2(t)||^{-1}$ is equal to
$$\frac{1}{4\pi}\oint_{\gamma_1}\oint_{\gamma_2}\frac{\mathbf{r}_1-\mathbf r_2}{||\mathbf{r}_1-\mathbf r_2||^3}\cdot (d\mathbf r_1\times d\mathbf r_2).$$
There is a functor from $Top$ to the category of short exact sequences of abelian groups such that for each topological space $X$, we get a short exact sequence
$$0\rightarrow Ext (H_{n-1}(X);\mathbb R)\rightarrow H^n(X;\mathbb R)\xrightarrow\beta Hom(H_n(X);\mathbb R)\rightarrow 0,$$
where $\beta$ is given by $\beta([f])([\alpha])=f(\alpha)$. This is a particular version of the universal coefficients theorem.
Recall the $Ext$ functor on the category of pairs of abelian groups. For any abelian group $G$ we have $Ext(\mathbb Z/n\mathbb Z,G)=G/nG$.
Now, if $M$ is a compact manifold, then $Ext(H_{k-1}(M),\mathbb R)=0$ as $\mathbb R$ is a divisible abelian group, for all $k\geq 1$, so we get a natural isomorphism $H^k(M;\mathbb R)\cong Hom(H_k(M);\mathbb R)$ as described above. However, as the De Rham's isomorphism is also natural, we obtain a natural isomorphism $\psi_M: H_{DR}^k(M)\rightarrow Hom(H_k(M);\mathbb R)$, which is the composition of the De Rham's isomorphism $H_{DR}^k(M)\rightarrow H^k(M;\mathbb R)$ and the map $H^k(M;\mathbb R)\rightarrow Hom(H_k(M);\mathbb R)$ just given. This isomorphism is given by $$\psi_M([\omega])([\alpha])=\int_{\alpha}\omega;$$
of course we're using $C^\infty$ chains to compute $H_k(M)$.
If $M$ is orientable and of dimension $n$, there is a canonical generator of $H_n(M)$, which can be obtained from a triangulation of $M$, and is a chain $\sum_{\sigma}(-1)^{i_\sigma}\sigma$, where $\sigma$ goes through the set of $n$-simplices of the triangulation and the signs $(-1)^{i_\sigma}$ can be uniquely obtained from the orientation of $S$ in order to obtain a cycle. We denote this element by $[M]$; this is the so called fundamental class. Then it is clear by this construction that $\int_M\omega=\int_{[M]}\omega$ for all $n$-forms $\omega$ of $M$.
Thus, by using the canonical isomorphism $\psi_M$, we can determine a unique element of $H_{DR}^n(M)$ by taking the only element $[\omega]\in H_{DR}^n(M)$ such that $\psi_M([\omega])=1,$ i.e., $1=\int_{[M]}\omega=\int_M\omega$.
Let us denote such a $\omega$ by $\omega_M$; this is unique up to class in $H_{DR}^n(M)$.
Now, if we have two oriented manifolds $M$ and $M´$ of dimension $n$, and a smooth map $f:M\rightarrow M´$, we have, because of the naturality of $\psi_{\_}$, a commutative diagram
$\require{AMScd}$
\begin{CD}
H^n_{DR}(M')@>\psi_{M'}>> Hom(H_n(M');\mathbb R)\\
@Vf^\ast VV @VVV\\
H_{DR}^n(M)@>\psi_{M}>> Hom(H_n(M);\mathbb R),
\end{CD}
where the vertical arrow to the right is the function $g\mapsto g\circ f_\ast$. We have
$$
\begin{split}
\int_Mf^\ast\omega_{M'}&=\psi_M(f^\ast([\omega_{M'}]))([M])=\psi_{M'}([\omega_{M'}])\circ f_\#([M])\\
&=\psi_{M'}([\omega_{M'}])(\deg(f)[M'])=\deg(f)\psi_{M'}([\omega_{M'}])([M'])\\
&=\deg(f).(\clubsuit)
\end{split}
$$
What follows is a modification of an argument given in S. Morita's Geometry of Differntial Forms:
Now, let us consider the following differential form of $\mathbb R^3$: $$\omega:=x_1dx_2\wedge dx_3-x_2dx_1\wedge dx_3+x_3dx_1\wedge dx_2.$$
Then it is clear that $d\omega=3dx_1\wedge dx_2\wedge dx_3$. Let $\omega_0$ be th restriction of $\omega$ to the submanifold $S^2$ of $\mathbb R^3$. We have by Stokes theorem that since $\partial D^3=S^2$
$$\int_{S^2}\omega_0=\int_{D^3} d\omega=3\int_{D^3}dx_1\wedge dx_2\wedge dx_3=4\pi,$$
as the volume of a unitary $3$-ball is $\frac{4}{3}\pi$. Notice $\omega_0$ is a closed form as it is a $2$-form of $S^2$. From this and $(\clubsuit)$ we get
$$\deg(F)=\frac{1}{4\pi}\int_{S^1\times S^1}F^\ast\omega_0.$$
Now consider the function $\hat F:S^1\times S^1\rightarrow\mathbb R^3\setminus\{0\}$ given by $(s,t)\mapsto \gamma_1(s)-\gamma_2(t)$, and the function $P:\mathbb R^3\setminus\{0\}\rightarrow S^2$ given by $x\mapsto x/||x||$. Then $P$ is a homotopy equivalence, with homotopic inverse the inclusion $i:S^2\rightarrow \mathbb R^3\setminus\{0\}$. Notice $F=P\circ \hat F$.
Consider the $2$-form of $\mathbb R^3\setminus\{0\}$ given by
$$\eta:=\frac{1}{||x||^3}(x_1dx_2\wedge dx_3-x_2dx_1\wedge dx_3+x_3dx_1\wedge dx_2),$$
then it is easy to see that $d\eta=0$. Also, $\eta$ restricted to $S^2$ equals $\omega_0$, i.e., $i^\ast\eta=\omega_0$. We have
$$
\begin{split}
\deg(F)&=\frac{1}{4\pi}\int_{S^1\times S^1}F^\ast\omega_0=\frac{1}{4\pi}\int_{S^1\times S^1}(P\circ\hat F)^\ast\omega_0\\
&=\frac{1}{4\pi}\int_{S^1\times S^1}(\hat F^\ast\circ P^\ast)\omega_0=\frac{1}{4\pi}\int_{S^1\times S^1}\hat F^\ast\eta
\end{split}
$$
where the last equality follows from $P^\ast([\omega_0])=[\eta]$ as $i^\ast([\eta])=[\omega_0]$ and $P$ and $i$ are homotopic inverses.
$\gamma^i$ is a vector valued function $(\gamma_1^i,\gamma_2^i,\gamma_3^i)$, for $i=1,2$.
We have $\hat F^\ast dx_j={\gamma_1^j} '(s)ds-{\gamma^j_2}'(t)dt$ for $j=1,2,3$. From this it is not hard to prove that
$$\deg(f)=\frac{1}{4\pi}\int_{S^1\times S^1}\hat F^\ast\eta=\frac{1}{4\pi}\int_{S^1\times S^1}\frac{\det(\gamma_1'(s),\gamma_2'(t),\gamma_1(s)-\gamma_2(t))}{||\gamma_1(s)-\gamma_2(t)||^3}dsdt.$$
Finally, it is not hard to see this last integral is equal to the integral of the proposition.
In these notes it is shown, in section 1.4, that the definition of the linking number using the integral in our proposition and the definition of the linking number using a link diagram coincide.
Now let us show show your definition coincides with the definition using the degree of the Gauss map.
Suppose we have a smooth embedding $\gamma:S^1\rightarrow \mathbb R^3$. Then it is clear we can build another embedding $\eta:S^1\rightarrow\mathbb R^3$ disjoint from $\gamma$ such that one piece of a diagram of the link $\gamma\cup\eta$ looks like this
$\hskip2in$
Then $[\eta]$ is a generator of the group $H_1(\mathbb R^3\setminus\gamma)$; this is a standard knot theory fact; see for instance Lickorish's book on knots. We can define the linking number of $\gamma$ with another disjoint oriented knot $K$, by simply defining $Lk(\gamma,K)$ as the interger $n$ such that $[K]=n[\eta]$ in $H_1(\mathbb R^3\setminus\gamma)$. In Lickorish book it is proved that the definition using a diagram and this definition coincide, so in particular it coincides with our definition using the integral in the proposition.
Fix a $1$-form $\omega$ of $\mathbb R^3\setminus\gamma$ such that $\psi_{\mathbb R^3\setminus\gamma}([\omega])([\eta])=1$. If $K:S^1\rightarrow\mathbb R^3\setminus\gamma$ is a smooth embedding and $n$ is such that $[K]=n[\eta]$ in $H_1(\mathbb R^3\setminus\gamma)$, then
$$\int_K\omega=\psi_{\mathbb R^3\setminus\gamma}([\omega])([K])=\psi_{\mathbb R^3\setminus\gamma}([\omega])(n[\eta])=n.$$
Therefore, your definition coincides with the definition using the first homology group of the complement of a knot, and thus coincides with the definition using the integral of our proposition, and thus in turn it coincides with the definition using the degree of the map $F$.