You are correct. It is baptism that makes us children of God by adoption for it is in baptism that we receive the indwelling of the Holy Spirit, the Spirit of adoption.
Paragraph 1265 of the Catechism of the Catholic Church, says:
1265. Baptism not only purifies from all sins, but also makes the neophyte “a new creature,” an adopted son of God, who has become a “partaker of the divine nature,”[68] member of Christ and co-heir with him,[69] and a temple of the Holy Spirit.
In Acts 2:38. it says:
38And Peter said to them, "Repent, and be baptized every one of you in the name of Jesus Christ for the forgiveness of your sins; and you shall receive the gift of the Holy Spirit.
And in Romans 8:15-17, St. Paul says:
15For you did not receive the spirit of slavery to fall back into fear, but you have received the spirit of sonship. When we cry, “Abba! Father!” 16it is the Spirit himself bearing witness with our spirit that we are children of God, 17and if children, then heirs, heirs of God and fellow heirs with Christ, provided we suffer with him in order that we may also be glorified with him.