Epigraphs are like little appetizers to the great entrée of a story. They illuminate important aspects of the story, and they get us headed in the right direction.
By this art you may contemplate the variation of the 23 letters...
—Anatomy of Melancholy, Pt. 2, Sec. II, Mem. IV
Like so many references in Borges' stories, this one has a whole bunch of implications. The quote is taken from a real book, called Anatomy of Melancholy, which was first published in Britain in 1621 by a guy named Robert Burton. As a writer, Burton actually reminds us a lot of Borges – he has a sense of humor and likes to play with words, he includes lots of references to different authors (some of whom are imaginary), and he tends to get off track easily. Stylistically, Anatomy of Melancholy is a very Borgesian text, and we totally get why Borges liked it so much.
But Burton's book isn't just stylistically similar to "The Library of Babel." Because it deals with a huge variety of topics and includes quotations from multiple authors, it's also kind of a miniature model of Borges' Library.
The overarching theme of Anatomy is supposed to be melancholia (though, like we said, Burton tends to digress a lot). In the preface, Burton, writing under a pseudonym, says, "I write of melancholy by being busy to avoid melancholy." Sound familiar? In "The Library of Babel," our narrator expresses exactly the same sentiment: "Methodical composition distracts me from the present condition of humanity" (14). In Borges' story, the idea of writing is actually connected to melancholy – the inhabitants of the Library are depressed because there's way too much information in the universe, and "the certainty that everything has already been written annuls us, or renders us phantasmal" (14). It's sort of ironic, then, that both Burton and Borges' narrators would write in order to avoid being melancholy.
When Burton tells us that "By this art you may contemplate the variation of the 23 letters..." he's referring to reading Christian scripture (which in 17th-century Europe was written in the 23 letters of the classical Latin alphabet). On one level this epigraph really sums up a major point of "The Library of Babel" – that we should consider the "art" of writing itself, in the sense that it's nothing but the arbitrary combination of different letters.
One last point (we promise): this epigraph plainly contradicts one of the basic "axioms" of the Library – that there are only 25 written symbols, including the space, comma, period... and only 22 letters. In other words, it's referring to an entirely different alphabet than the one contained in the Library. Furthermore, the epigraph itself contains some numerical symbols (like '2' and '3') that don't appear in the Library. Um... we're confused. Does that mean this story exists outside of the Library? Did the narrator write this epigraph, or was it someone else? There's a lot to say about this idea, and it's related to our discussion of "The Editor" in the section "Character Roles."
The whole text of Anatomy of Melancholy is available online at Project Gutenberg, if you want to check it out.