In Gaston Leroux’s 1910 novel The Phantom of the Opera, the fictional opera company performs Charles Gounod’s Faust (1859). “Hannibal” is not mentioned as an opera in the book.
Possible confusion: Hannibal is an opera by Victorin Joncières (1875), but unrelated to Leroux’s plot. The 2004 film The Phantom of the Opera opens with a fictional “Hannibal” rehearsal—but this is a movie invention, not from the source material.