Dies Irae
The ending theme and a recurring theme throughout the film seems to be based on the Dies Irae, just like the opening theme of The Shining. This surprised me, because I always thought The Shining was unique in that respect. Kubrick himself came up with the idea to use it, and who knows, perhaps he heard it in The Vault of Horror, and subliminally began associating it with horror.