The Basilica of St. Mary is home to the very first Catholic parish founded in the Commonwealth of Virginia and West Virginia (they were one state until 1863). The parish was established in 1795 as the Church of St. Mary by the Very Reverend Francis Ignatius Neale, S.J., who was also the President of Georgetown College (now university) and the Pastor of Holy Trinity Church (est. 1787). President George Washington, who became aware of efforts to establish a Catholic parish in 1788, donated funds to the endeavor. The land on which the first church building stood is now the basilica's cemetery, which was the first Catholic cemetery in Virginia. As the first Catholic parish in the Commonwealth, St. Mary's served as the mother church to other Catholic parishes in Virginia. As such, it was instrumental in growing Catholicism in the region.
The first Catholic mass in Alexandria was offered by a Catholic chaplain to French soldiers in 1781 (the French were assisting the Americans in the fight agaisnt the British in the American Revolutionary War). In 1788, five years after the war concluded, former Aide-de-Camp of General Washington, Colonel John Fitzgerald, initiated a fundraising campaign to build the first Catholic church in the Commonwealth. It was at this time that George Washington donated money to the cause (Fitzgerald hosted a dinner that Washington attended). Other prominent member of Maryland and Virginia society contributed as well. Thornton Alexander, the son of Alexandria founder John Alexander, donated property where the parish' first church building would be erected (as stated above, it is now where the cemetery is located).
The property for the current church was purchased in 1810. It took many years for the current church to be built, however. Most of it was it was erected in 1827 and a bell and tower in 1856 (the present bell tower was added in 1894). A number of other additions and alterations have been made over the years as well. On January 14, 2018, the Vatican officially designated the church as Minor Basilica.