The priest stops at the door of the church to knock with the cross, symbolically opening the gates of the Heavenly Jerusalem.
Before the celebration of Palm Sunday Mass, the priest will typically process in from the back of the church to reenact Jesus’ procession into Jerusalem.
According to Dom Prosper Gueranger in his Liturgical Year, when the priest approached the doors of the Church, he used to symbolically knock at the door with the cross.
At the close of the Procession, a ceremony takes place which is full of the sublimest symbolism. On returning to the church, the doors are found to be shut. The triumphant Procession is stopped, but the songs of joy are continued. A hymn in honor of Christ our King is sung with its joyous chorus and at length the Subdeacon strikes the door with the staff of the cross, the door opens and the people, preceded by the clergy, enter the church proclaiming the praise of Him who is our Resurrection and our Life
This small knock may not seem like much, but it is rich in symbolism.
This ceremony is intended to represent the entry of Jesus into that Jerusalem, of which the earthly one was but the figure, the Jerusalem of heaven, which has been opened for us by our Savior. The sin of our first parents had shut it against us, but Jesus the King of glory opened its gates by his Cross, to which every resistance yields. Let us then continue to follow in the footsteps of the Son of David for he is also the Son of God and he invites us to share his Kingdom with him.
The Roman Rite today does not include the knock, but it is still retained by those who celebrate the Extraordinary Form.