The "Glory Be" prayer, or the "Gloria Patri" in Latin, is an ancient, short prayer that is meant to praise and give glory to each of the three persons of the Trinity, namely, the Father, the Son and the Holy Spirit. It is also meant as an affirmation against heresy.
The "Glory Be" is part of a long tradition of doxologies, or short prayers of praise, that the early church developed in order to combat what it considered to be heresies against the nature of God and the Trinity. Arianism and other teachings arose and challenged the belief of the early Christians regarding such questions as to whether Jesus was truly God or merely a creature with a beginning in time. The early doxologies, and the "Glory Be" that grew out of them, were meant, in part, as an affirmation of what the early church believed to be the orthodox, or correct, teaching on the Father, Son and Holy Spirit. As was often the case in the early church, doctrine and worship joined together; thus one commonly finds doctrinal affirmations against heresy taking the form of a prayer or creed. In this way, Christians pledged themselves to orthodoxy in the course of their prayer and liturgical lives.