Temperature gradient in stars It is a well known fact that in stars, there exists a temperature gradiënt. The 
observational reason is because we perceived spectral lines in the otherwise continuous spectrum of a star. If this wasn't the case, and thus if the temperature were uniform, then the absorption and the emission would cancel each other out and we would observe a net effect that results in a continuous spectrum. Now my question is: what is the physical explanation for this temperature gradient?
You're talking about the temperature gradients in the atmosphere of a star, that's where the emission and absorption lines are originating. This is a much more complicated matter than the star itself.

The temperature of a star must increase from its surface downwards.
This is a simple result of the fact that the stellar structure is given by pressure gradients balancing the force of gravity. We can express this via the law of hydrostatic equilibrium
$$\frac{\partial P}{\partial r} = -g(r)\rho  $$
which is a pretty good approximation to reality in most cases.

The pressure gradient then translates into a temperature gradient, as the pressure originates in the thermal motion of particles, formalized as the law of ideal gases
$$ P = \frac{\rho k_B T}{\mu} $$.

So wherever there's non-zero gravity and no other force in a gaseous medium, there will be temperature gradients. 

In an atmosphere, things depend on how efficient the gas is at cooling. In very thin media, like in Earths or any planets / stars exosphere cooling is inefficient enough to make temperature gradients vanish.