The Catechism in Questions & Answers

522. What is the significance of Jesus’ baptism and subsequent anointing with the Holy Spirit?

The baptism of Jesus by John the Baptist and the descending of the Holy Spirit upon Jesus are references to the sacraments of Holy Baptism with water and Holy Sealing.
The anointing of Jesus with the Holy Spirit distinguishes Him as the Messiah. It is a reference to the sacrament of Holy Sealing. It is also to this event that Acts 10: 37-38 refers: “That word you know, which was proclaimed throughout all Judea, and began from Galilee after the baptism which John preached: how God anointed Jesus of Nazareth with the Holy Spirit and with power.”

Already in the old covenant, individuals were consecrated for specific duties through anointing. Such anointing was given to prophets, kings, and priests. See also “Messiah” (= “the Anointed One”), Questions 111 and 112.