The myth is that Bach's music had been forgotten until Mendelssohn resurrected him. You'll find it in biographic profiles and lists of interesting facts. It's an appealing tidbit because it seems so contrary to our perception of Bach today. Bach is one of the few classical composers that most people have even heard of; even if they can't name him, people can at least recognize a few bars of his work. Whenever we see a television character appreciating some Bach, we know we're meant to understand that their brain is processing information at a higher level, thanks to popular culture linking Bach's music to depictions of genius (a phenomenon that started in the twentieth century, as studied by my friend Kristi Brown-Montesano). Since Bach is ubiquitous nowadays, it would be easy to assume that it’s always been that way. Finding out that it was the exact opposite way for decades after his death is pleasantly surprising, in that it's something you can say to impress people at parties.
Like most myths, this one is based on a kernel of truth. Bach was not famous in his own time, certainly not an international superstar like Handel. Mendelssohn did organize a performance of the St. Matthew Passion, and that concert did much to popularize Bach. But it would be inaccurate to call Bach "forgotten" up to 1829, and Mendelssohn is not solely responsible for launching Bach's posthumous career. Though the myth of Mendelssohn "discovering" Bach might lead one to imagine him as a musical Indiana Jones stumbling across a dusty manuscript, eyes widening as he gradually realizes its brilliance, that just wasn't the case.
Instead of marking the beginning of the Bach revival, Mendelssohn's performance was part of a larger Bach appreciation movement that was already underway. The first biography of Bach was published in 1802 by Johann Nikolaus Forkel. Beethoven himself proclaimed that Bach (German for "brook") should have been named Meer ("sea") because his music was so great. Not bad for someone whose existence was allegedly unknown at that point!
As Christoph Wolff pointed out in 2004, Bach's music continued to circulate among two different groups: professional musicians (including Haydn, Mozart, and Beethoven) and middle-class intellectuals. In the late eighteenth and nineteenth century, people with enough education and leisure time to do so liked to gather together in people's homes to discuss various smart topics; these gatherings were known as "salons." (We associate that word with hairdressers today because they were once seen to fulfill the same role in society: a place where people discuss the goings-on of the world.) Wolff's essay focuses on the salon of Sara Levy, which attracted people who were interested in old music at a time when newly composed music dominated the concert halls.
Sara Levy was Mendelssohn's great-aunt, so he came to know Bach by virtue of being born into a well-connected, intellectually active family. As a musician, he also knew of Bach through his composition studies with Carl Friedrich Zelter. Bach's music was revered, but it wasn't often performed. Around the time Mendelssohn started his career, though, there was a shift in concert culture: People became more receptive to hearing live performances of music by dead composers, a trend that dominates classical music culture today.
The 1829 performance of the St. Matthew Passion is an important landmark in the afterlife of Bach's music. It was a major event that took a lot of coordinated effort on Mendelssohn's part, and it brought Bach's music to people who had not heard it performed in a concert setting before. But Bach's music hadn't disappeared before that point, so calling him "completely forgotten by history" is an exaggeration.
Thank you to Jeff Sposato and Angela Mace Christian for their feedback on this topic!
For more information on Sara Levy, check out "Silence from the Salon: In Search of Sara Levy" by Rebecca Cypess on The Avid Listener, another blog devoted to public musicology.
"Bach would’ve been completely forgotten by history without this document" by Rob Weinberg on Classic FM
"A Bach Cult in Late-Eighteenth Century Berlin: Sara Levy's Musical Salon" by Christoph Wolff in the Bulletin of the American Academy of Arts and Sciences