In general, gauges are built with Flash as they require an animation.
How it works?
The code sets a starting and an end value. Using the HTML Canvas element, it draws the needle and simply rotates it according to the current data. For more information about Canvas element, check this WRD post.
As Internet Explorer does not support Canvas element natively, this Canvas gauge uses IECanvas for that.
Working demo can be found here.
There is also a dynamic Flash gauge at the same page.