In the setting of Mazur's "primes and knots" analogy, prime ideals $\mathfrak p\subset\mathcal O_K$ correspond to "knots" $\operatorname{Spec}\mathcal O_K/\mathfrak p$ inside a "3-manifold" $\operatorname{Spec}\mathcal O_K$. The law of quadratic reciprocity $(\frac pq)=(-1)^{(p-1)(q-1)/4}\cdot(\frac qp)$ is thus analogous to the symmetry of the linking number $\operatorname{lk}(\gamma_1,\gamma_2)=\operatorname{lk}(\gamma_2,\gamma_1)$.
NOTETHANKS: for more details on Mazur's analogy, see to S. Carnahan's comment belowCarnahan for linking some linkedother questions (see below) which give lots of interesting background on Mazur's analogy.
I have read in a few places (e.g. the book Knots and Primes by Masanori Morishita p59 Remark 4.6) that in this analogy the Gauss linking integral: $$\operatorname{lk}(\gamma_1,\gamma_2)=\int_{K_1}\int_{K_2}\omega(x-y)\,dxdy$$ for a certain 2-form $\omega$ on $\mathbb R^3\setminus 0$ (in particular, its interpretation as the $U(1)$ Chern--Simons path integral as in Witten) is analogous to the Gauss sum expression for the Legendre symbol $(\frac pq)$.
Can someone give more details on how exactly the Gauss sum is analogous to the abelian path integral (or a reference)?