In the lectures, we have defined the generalized momentum in the Lagrangian to be:
$$p_i=\frac{\partial L}{\partial\dot q_i}.$$
But with this definition, if we do not make any assumptions about the system, the momentum becomes:
$$p_i=\frac {\partial T}{\partial\dot q_i} -\frac {\partial U}{\partial \dot q_i}.$$
As far as I know, the definition for momentum in the Newtonian mechanics is: $$p= \frac {\partial T}{\partial \dot r}= \frac {\partial\ \frac 12 m \dot r^2}{\partial\dot r} = m\dot r$$
Then what is the physical meaning of the potential term $$-\frac {\partial U}{\partial \dot q}$$ in the Lagrangian formalism and where does it come from?