According to the Spookipedia, the Vile Vial is one of many spirit objects that was supposed to be banished to Demon World, although mysteriously, it was found by one of Jimmy's underlings on the outskirts of Frightside.
It was originally in possession of IGPHHangout during his brief rule of Frightside. However, the vial along with the other rumored spirit objects, were banished with him to Demon World prior to the events of the first Movie.
The vial contains some of the sacred energy believed to have belonged to the original King of Frightside, Enma. With it, the user takes on godlike characteristics and in the case of Jimmy, had enough life force to bring him back to life.
When Tommy Dickles drank the last drop, he was able to manifest his sacred energy into physical, tangible matter and was described to be "as strong as Hannah herself"!