An epic is a long, narrative poem that celebrates the adventures of a hero while using elevated language. The Divine Comedy is categorized as an epic because of its length (3 canticas, for a total of 14,000+ lines). It tells the story of Dante (protaganist and author) and his journey through Purgatory, Paradise, and Hell. Dante is considered the hero of this comedy because of his trials and tribulations through the nine rings of hell. It is a test of his inner strength.
Another element of an epic is a vast setting, as evidenced in The Divine Comedy by Purgatory, Paradise, and Hell.