Q: What's the difference between using virial theorem and total energy? What the difference between using
$$E_{tot} = E_{grav} + U $$
and
$$<T> = - \frac{1}{2} <U>$$

A: First of all, your total energy should include the kinetic energy as well,
$$E_{tot} = U + T$$
where $U$ is any potential energy (gravitational, electromagnetic...). 
This is sort of the definition of "total energy". The Virial Theorem relates the mean kinetic energy of a system of particles with the mean of it's potential energy. This is an important result, since it allows for easier computations of the kinetic energy (or at least to compute either one when one knows the other). For example, in thermal equilibrium the mean kinetic energy is easily obtain from the temperature of the system through the equipartition theorem, and then the mean potential energy is known as well.
