The gesture is a direct imitation of what the priest is instructed to do before he recites the words of the holy Gospel. The Roman Missal states, “Then, with the thumb of his right hand, he makes the sign of the cross first on the book at the beginning of the Gospel to be read, and then on himself on the forehead, mouth, and breast.”
Prior to that, if a deacon is going to proclaim the Gospel, the priest will give him a blessing where he recites the following prayer.
May the Lord be in your heart and on your lips,
that you may proclaim his Gospel worthily and well,
in the name of the Father and of the Son and of the Holy Spirit.
In a similar way, when the priest is the one to proclaim the Gospel, he prays these words silently.
Cleanse my heart and my lips, almighty God,
that I may worthily proclaim your holy Gospel.
The laity and all others attending Mass, are invited to make a similar prayer and gesture before the Gospel is read. They are encouraged to say interiorly a brief prayer that prepares them to receive the Word of God.
May the Word of the Lord be on my mind, on my lips, and in my heart.