Today’s Advent hymn was written by an early Fransican, Thomas of Celano, who also wrote one of the first biographies of St. Francis of Assisi. It was originally an Advent hymn, since part of Advent is expecting the Second Coming. Later, a few verses were added and it became a funeral hymn, eventually the official Sequence (long song before the Gospel) in the Tridentine liturgy (sequences are almost completely out of use in the Pauline Mass, except for a couple major feasts).
Since the Novus Ordo does not use sequences (except in a few major feasts), the Dies Irae is no longer an “official” part of the funeral Mass. However, it can still be used as a hymn at Masses for funerals, All Souls Day and in the Divine Office, as well as Christ the King and Advent (see also this wikipedia article, to which I contributed).
Anyway, it’s a great hymn. It’s inspired some of the greatest music in western civilization (both in musical settings of its text and works that are based on its standard Gregorian setting). So as you’re preparing to celebrate Christmas, why not remember to “keep Satan in Christmas” and break out your Berlioz, Mozart or Lloyd Webber to remember why we need a Savior.