The easiest way to understand why Langevin dynamics targets the "correct distribution" is to look at the corresponding Fokker-Planck equation.
Let me be more precise. Let us assume that our target distribution has the following density:
$\pi(x) = \frac1{Z} \exp(-U(x))$,
where $x \in \mathbb{R}^d$, $U$ is often called the potential energy, and $Z$ is the normalizing constant.
The Langevin algorithm, either the Metropolis-adjusted version (MALA) or the unadjusted version (ULA), is based on the Langevin diffusion, that is described by the following stochastic differential equation (SDE):
$dX_t = -\nabla U(X_t)dt + \sqrt{2}dB_t$,
where $B_t$ denotes the standard Brownian motion. To understand how the probability density function of $X_t$ evolves in time, we can use a very useful tool, which is called the Fokker-Planck equation (FPE). For notational simplicity let us assume we are in the scalar case, i.e. $d=1$ (for $d>1$ the idea is the same). In this case the FPE reads:
$\partial_t p(x,t) = \partial_x (\partial_x U(x) p(x,t)) + \partial_x^2 p(x,t)$,
where $p(x,t)$ is the probability density function of $X_t$ at time $t$. Now the main trick is this:
Let us assume the process $(X_t)_{t \geq 0}$ (which is a Markov process) is ergodic with its invariant measure. Then, when $p(x,t)$ reaches to this invariant measure, it cannot deviate from it anymore (since it's the invariant measure). Hence, when $p(x,t)$ converges to the invariant measure, then $\partial_t p(x,t)$ must be equal to zero (since it won't change over the time $t$).
Given this observation, in order to verify that the invariant measure of the Langevin equation is indeed $\pi$, we only need to check if $\partial_t p(x,t)$ becomes $0$ or not, when we replace $p(x,t)$ by $\pi(x)$. Now, let's see if this really happens:
\begin{align}
\partial_t p(x,t) &= \partial_x (\partial_x U(x) \pi(x)) + \partial_x^2 \pi(x) \\
&= \partial_x (\partial_x U(x) \pi(x) + \partial_x \pi(x))
\end{align}
By using the fact that $\partial_x U(x) = -\partial_x \log \pi(x)= - \frac1{\pi(x)} \partial_x \pi(x)$, we obtain:
\begin{align}
\partial_t p(x,t) &= \partial_x (- \frac1{\pi(x)} \pi(x) \partial_x \pi(x) + \partial_x \pi(x)) \\
&= \partial_x (- \partial_x \pi(x) + \partial_x \pi(x)) \\
&= 0.
\end{align}
Then, this shows that $\pi$ is an invariant distribution of the process $(X_t)_t$, and if $(X_t)_t$ has a unique invariant distribution (for instance if $\nabla U$ is Lipschitz), then $\pi$ is the unique invariant distribution.
Now, if we go back to ULA (unadjusted Langevin algorithm) or MALA (Metropolis adjusted Langevin algorithm), they are both based on the Euler discretization of the Langevin SDE:
$Y_{n+1} = Y_{n} - \eta \nabla U(Y_n) + \sqrt{2\eta} Z_{n+1}$,
where $Z_n$ is a standard Gaussian random variable. This scheme is called ULA. The process $(Y_n)_n$ is still a Markov process, but it doesn't target $\pi$ anymore due to the discretization error. Hence, one can couple it with a Metropolis acceptance step to get rid of this error. The resulting algorithm is called MALA.
I hope it's more clear now.