From the Catechism of the Catholic Church.
The Sacrament of the Eucharist
The institution of the Eucharist
1337 The Lord, having loved those who were his own, loved them to the end. Knowing that the hour had come to leave this world and return to the Father, in the course of a meal he washed their feet and gave them the commandment of love.163 In order to leave them a pledge of this love, in order never to depart from his own and to make them sharers in his Passover, he instituted the Eucharist as the memorial of his death and Resurrection, and commanded his apostles to celebrate it until his return; "thereby he constituted them priests of the New Testament."164
1338 The three synoptic Gospels and St. Paul have handed on to us the account of the insti-tution of the Eucharist; St. John, for his part, reports the words of Jesus in the synagogue of Capernaum that prepare for the institution of the Eucharist: Christ calls himself the bread of life, come down from heaven.165
1339 Jesus chose the time of Passover to fulfill what he had announced at Capernaum: giv-ing his disciples his Body and his Blood:
Then came the day of Unleavened Bread, on which the passover lamb had to be sacrificed. So Jesus sent Peter and John, saying, "Go and prepare the passover meal for us, that we may eat it. . . ." They went . . . and prepared the passover. And when the hour came, he sat at table, and the apostles with him. And he said to them, "I have earnestly desired to eat this Passover with you before I suffer; for I tell you I shall not eat it again until it is fulfilled in the kingdom of God.". . . . And he took bread, and when he had given.
1322 The Holy Eucharist completes Christian initiation. Those who have been raised to the dignity of the royal priesthood by Baptism and configured more deeply to Christ by Confir-mation participate with the whole community in the Lord's own sacrifice by means of the Eucharist.
1323 "At the Last Supper, on the night he was betrayed, our Savior instituted the Eucha-ristic sacrifice of his Body and Blood. This he did in order to perpetuate the sacrifice of the cross throughout the ages until he should come again, and so to entrust to his beloved Spouse, the Church, a memorial of his death and resurrection: a sacrament of love, a sign of unity, a bond of charity, a Paschal banquet 'in which Christ is consumed, the mind is filled with grace, and a pledge of future glory is given to us.'"135