Definition. If $U\subset\mathbb{R}$ is open, we say that $u\in {AC}(U)$ if $u$ is absolutely continuous on every compact interval in $U$. Let $\Omega\subset\mathbb{R}^n$. We say that $u$ is absolutely continuous on lines, $u\in {ACL}(\Omega)$, if the function $u$ is Borel measurable and for almost every line $\ell$ parallel to one of the coordinate axes, $u|_\ell\in AC(\Omega\cap\ell)$. Since absolutely continuous functions in dimension one are differentiable a.e., $u\in {ACL}(\Omega)$ has partial derivatives a.e.
Theorem. $f\in L^1_{\rm loc}(\Omega)$ has weak derivative $\nabla f\in L^1_{\rm loc}(\Omega)$ if and only if $f\in ACL(\Omega)$. Moreover the pointwise derivative of $f$ which exists a.e., equals to the weak derivative.
Remark. Functions that are equal a.e. are identified so by writing $f\in ACL(\Omega)$ we mean that $f$ equals a.e. to a function that belongs to $ACL(\Omega)$.
The above result is Theorem 4.21 in [EG] or Theorem 2.23 in [H] or Theorem 1 p. 4 and Theorem 2 p. 6 in [M].
[EG] L. C. Evans, R. F. Gariepy, Measure theory and fine properties of functions. Revised edition. Textbooks in Mathematics. CRC Press, Boca Raton, FL, 2015.
[H] http://www.pitt.edu/~hajlasz/Notatki/jyv-98b.pdf
[M] V. Maz'ya, Sobolev spaces with applications to elliptic partial differential equations. Second, revised and augmented edition. Grundlehren der Mathematischen Wissenschaften [Fundamental Principles of Mathematical Sciences], 342. Springer, Heidelberg, 2011.