The Gospel of Luke 2:22-40 states:
And when the time came for their purification according to the law of Moses, they brought him up to Jerusalem to present him to the Lord (as it is written in the law of the Lord, “Every male that opens the womb shall be called holy to the Lord”) and to offer a sacrifice according to what is said in the law of the Lord, “a pair of turtledoves, or two young pigeons.” Now there was a man in Jerusalem, whose name was Simeon, and this man was righteous and devout, looking for the consolation of Israel, and the Holy Spirit was upon him. And it had been revealed to him by the Holy Spirit that he should not see death before he had seen the Lord’s Christ. And inspired by the Spirit he came into the temple; and when the parents brought in the child Jesus, to do for him according to the custom of the law, he took him up in his arms and blessed God and said,
“Lord, now lettest thou thy servant depart in peace, according to thy word; for mine eyes have seen thy salvation which thou hast prepared in the presence of all peoples, a light for revelation to the Gentiles, and for glory to thy people Israel.”
And his father and his mother marveled at what was said about him; and Simeon blessed them and said to Mary his mother,
“Behold, this child is set for the fall and rising of many in Israel, and for a sign that is spoken against (and a sword will pierce through your own soul also), that thoughts out of many hearts may be revealed.”
And there was a prophetess, Anna, the daughter of Phanuel, of the tribe of Asher; she was of a great age, having lived with her husband seven years from her virginity, and as a widow till she was eighty-four. She did not depart from the temple, worshiping with fasting and prayer night and day. And coming up at that very hour she gave thanks to God, and spoke of him to all who were looking for the redemption of Jerusalem.
And when they had performed everything according to the law of the Lord, they returned into Galilee, to their own city, Nazareth. And the child grew and became strong, filled with wisdom; and the favor of God was upon him.
Regarding Simeon and Anna, Pope Benedict XVI said,
Even the priests proved incapable of recognizing the signs of the new and special presence of the Messiah and Saviour. Alone two elderly people, Simeon and Anna, discover this great newness. Led by the Holy Spirit, in this Child they find the fulfilment of their long waiting and watchfulness. They both contemplate the light of God that comes to illuminate the world and their prophetic gaze is opened to the future in the proclamation of the Messiah: “Lumen ad revelationem gentium!” (Lk 2:32). The prophetic attitude of the two elderly people contains the entire Old Covenant which expresses the joy of the encounter with the Redeemer. Upon seeing the Child, Simeon and Anna understood that he was the Awaited One.