Saint Joachim (יְהוֹיָקִים "he whom Yahweh has set") according to tradition was the father of the blessed Virgin Mary and Saint Anne (חַנָּה) according to the same tradition was the mother of the Blessed Virgin Mary.
Sacred Scripture contains no mention of either, and the majority of tradition or history comes from the apocryphal writing of the Gospel of James. Saint Anne's history closely follows the story of the birth of Samuel, whose mother Hannah had also been childless until divine intervention. The Gospel of James, written in the second century and in koine Greek, began to fall under a cloud of scrutiny in the fifth century and was declared untrustworthy by Pope Damascus I, Pope Innocent I and Pope Gelasius I. What is universally accepted, however, is that the parents of the Blessed Ever Virgin Mary brought their daughter up strong in faith.
The earliest pictorial sign in the West is an 9th century fresco at Santa Maria Aniqua, Rome. The two best known shrines to Saint Anne are French - Sainte Anne d'Auray in Brittany, France, and Saint Anne de Beaupre in Quebec, Canada. Saint Anne de Beaupre contains a relic of Saint Anne that was sent by Pope Leo XIII on September 8th, 1892. In the Eastern church, Justinian built a church dedicated to her in Constantinople around the year 550. Both the Nativity of Mary and the Presentation of Mary are celebrated as two of the twelve Great Feasts of the Orthodox Church.
The story of Saint Joachim is also found in the apocryphal Gospel of James. In it, Saint Joachim is a rich man who regularly gave to the poor and helped feed them. At the temple one day his sacrifice was rejected and he believed it to be due to the childlessness of the couple. He withdrew to the desert for 40 days fasting funtil an angel appeared to him promising he and Saint Anne a child. Originally the Tridentine Calendar did not include a celebration from Saint Joachim and it would not be added to the General Roman Calendar until 1584. In 1738 the date was transferred to the Sunday after the Octave of the Assumption of Mary but moved again to August 16th by Pope Pius X in an effort to keep the liturgy of Sundays celebrated. In the 1969 revision it was combined with Saint Anne to be celebrated on July 26th. The Eastern Orthodox and Greek Catholic church celebrates Saint Joachim on September 9th, the day after the Nativity of the Theotokos .
Because of their holy and righteous upbringing of the Blessed Virgin Mary, both Saints are patron saints of grandparents.