She devoted the last four decades of her life to studying theology (especially patristics) and to charitable work and serving the poor. She was a devout Catholic and wrote extensively on the marriage between intellectual pursuit and mystical contemplation, most notably in her essay Il cielo mistico (The Mystic Heaven). She saw the rational contemplation of God as a complement to prayer and contemplation of the life, death and resurrection of Jesus Christ.
Maria Gaetana Agnesi was born in Milan, to a wealthy and literate family. Her father Pietro Agnesi, a wealthy silk merchant, wanted to elevate his family into the Milanese nobility. In order to achieve his goal, he had married Anna Fortunato Brivio of the Brivius de Brokles family in 1717. Her mother's death provided her the excuse to retire from public life. She took over management of the household. She was one of 21 children.
Maria was recognized early on as a child prodigy; she could speak both Italian and French at five years of age. By her eleventh birthday, she had also learned Greek, Hebrew, Spanish, German, and Latin, and was referred to as the "Seven-Tongued Orator".