Ave Maria is a curious case of composition in music history. In 1852, during an evening with friends, Charles Gounod improvised an enticing melody over Bach's "Prelude in C Major" which was then overheard by a famous composer and pianist who was amazed by the music and asked Gounod to scribble down the piece in musical notations. When Gounod published his work one year later, it had a violin part along with a piano part based on Bach's prelude, although slightly changed.
Some years later, Gounod accompanied his adaptation of Bach's prelude by a poem and gifted a copy of it to one of his students under the title "Meditation". The poem, titled “Vers écrits sur un album” by Alphonse de Lamartine, was about the "book of life" and how no matter how we want to turn back the pages, the page where we die is already under our fingers. However, the letter was intercepted by that student's mother in law who found this situation inappropriate and replied back to Gounod with an alternative title under the original poem, and this was the popular text "Ave Maria". Gounod understood the message and changed the title of his work to "Ave Maria". This title therefore added a religious spirit to the music, which was not initially intended by the composer.
Ave Maria's harmonic structure is mainly Bach's creation, so Gounod did not consider this piece as a major work of his career. With time, “Ave Maria” has become a common background music at weddings and funerals due to its religious title, however reflecting on the "book of life" while listening to this music might be a more authentic way of feeling it.