St. Anna, the mother of the Theotokos, was the wife of St. Joachim and the daughter of Mattham, a Levi priest. Anna and Joachim were married and childless for about 50 years. This saddened them, and they vowed that should the Lord bless them with a child they would dedicate it to Him. Hoping their prayers would be answered, they brought gifts to the Lord's temple in Jerusalem on the yearly Feast of the Dedication (Hanukkah) and Feast of Lights (c.f. Macc 4:52-59; 2 Macc 10:5). The priests, however, did not wish to accept them, since they were from a childless man, and Joachim was scorned (c.f. St. Romanos the Melodist, c.490-556). Publicly humiliated he soon remembered that Abraham whom God gave a son in his old age. He then retired to the wilderness to pray, were the Archangel Gabriel told him that his prayers have been heard, and that Anna will give birth to a daughter who shall be called Mary.
The Archangel also reminded Joachim that, "according to your vow, she (Mary) shall be devoted to the Lord from her infancy, and she shall be filled with the Holy Spirit, even from her mother's womb. Mary shall not eat or drink anything unclean, nor shall her conversation or life be among the crowds of the people, but in the temple of the Lord, that it may not be possible to say, or so much as to suspect, any evil concerning her". Again, St. Romanos chants, "Joachim on the mountain prayed to receive fruit from the womb of Anna; and the prayer of the holy man was received".
Anna, meanwhile, went home to her garden weeping bitterly. She sat under a laurel tree and prayed, "O God of our fathers, bless me and hear my prayer, as You opened the womb of Sarah and gave her a son Isaac". She wept asking, "Alas, who begot me? And what womb did bear me, that I should be thus accursed before the children of Israel, and that they should reproach and deride me in the temple of my God? Woe is me, to what can I be compared? I am not like the fowls of the heaven, because even the fowls of the heaven are productive before You, O Lord. Alas! to what can I be compared? I am not like the beasts of the earth, because even the beasts of the earth are fruitful before You, O Lord Woe is me, to what can I be compared? I am not comparable to the waves of the sea; for these, whether they are calm, or in motion, with the fishes which are in them, praise You, O Lord. Alas! to what have I been likened? I am not like this earth because even the earth brings forth its fruit in season and blessed You, O Lord".
The same Archangel appeared to Anna and told her, "I am the angel who has presented your prayers and alms before God; and now I have been sent to you to announce that you shall bring forth a daughter, who shall be called Mary, and who shall be blessed above all women. She shall be full of the favour of the Lord, even from her birth. She shall remain in her father's house until she is weaned and, thereafter, she shall be delivered to the service of the Lord. She shall serve God, day and night, in fasting and prayers. She shall abstain from every unclean thing and shall not depart from the temple until she shall reach the years of discretion. She shall never know man, but alone and without precedent, as an immaculate and undefiled virgin, without intercourse with man, she shall bring forth a Son. She, His handmaiden, shall bring forth the Lord, both in grace, and in name, and in work, the Saviour of the world". Gabriel then said, "arise, therefore, and go up to Jerusalem; and when you arrive at the gate that, because it is plated with gold, is called 'Golden', there, for a sign, you shall meet your husband, for whose safety you have been anxious. When, therefore, you find these things accomplished, believe that all the rest which I have told you shall also undoubtedly be accomplished".
On this occasion St. Romanos chants, "the prayer and groaning of Joachim and Anna at their barrenness and childlessness have proved acceptable, and have come unto the ears of the Lord; and they have put forth fruit that brings life to the world. The one offered his prayer in the mountain, the other bore her reproach in the garden. But with joy the barren bears the Theotokos who sustains our life".
On the following day, Joachim brought his offerings into the temple, worshipped the Lord, and then returned home. There was great joy and celebration when it was heard that Anna conceived.
When Mary was three years old, her parents, after offering up their sacrifice, left her to be brought up with the other maidens in the apartments of the temple.
For the next seven years, Anna and Joachim visited Mary often until they reposed, leaving her an orphan. The Orthodox Church commemorates the dormition of St. Anna on 25th of July. Both of the Virgin Mary's parents are commemorated together on the 9th of September.