When a priest is ordained a bishop, he will typically chose a motto that is fixed on his personal coat of arms. It is an ancient tradition that is still maintained by many bishops around the world.
St. John Paul II was ordained an auxiliary bishop of Krakow, Poland, on September 28, 1958, the feast of St. Wenceslaus.
He then chose the words "Totus Tuus" to be put on his episcopal coat of arms.
Meaning of Totus Tuus
John Paul II explained why he chose those words in the book Crossing the Threshold of Hope:
Totus Tuus. This phrase is not only an expression of piety, or simply an expression of devotion. It is more. During the Second World War, while I was employed as a factory worker, I came to be attracted to Marian devotion. At first, it had seemed to me that I should distance myself a bit from the Marian devotion of my childhood, in order to focus more on Christ. Thanks to St. Louis of Montfort, I came to understand that true devotion to the Mother of God is actually Christocentric, indeed, it is very profoundly rooted in the Mystery of the Blessed Trinity, and the mysteries of the Incarnation and Redemption.
John Paul II also explained where the full phrase came from in a Letter to the Monfortian Religious Family:
As is well known, my episcopal coat of arms symbolically illustrates the Gospel text quoted above; the motto Totus tuus is inspired by the teaching of St Louis Marie Grignion de Montfort (cf. Gift and Mystery, pp. 42-43; Rosarium Virginis Mariae, n. 15). These two words express total belonging to Jesus through Mary: “Tuus totus ego sum, et omnia mea tua sunt,” St Louis Marie wrote, and he translates his words: “I am all yours, and all that I have is yours, O most loving Jesus, through Mary, your most holy Mother” (Treatise on True Devotion, n. 233). This saint’s teaching has had a profound influence on the Marian devotion of many of the faithful and on my own life.
St. Louis de Montfort was an 18th-century priest devoted to the Virgin Mary, and explains what happens with prayers addressed to Our Lady in his book True Devotion to Mary:
Our Blessed Lady, in her immense love for us, is eager to receive into her virginal hands the gift of our actions, imparting to them a marvelous beauty and splendour, and presenting them herself to Jesus most willingly. More glory is given to our Lord in this way than when we make our offering with our own guilty hands.
St. John Paul II firmly believed in the way St. Louis de Montfort presented Marian devotion and it affected him so much that he chose "Totus Tuus" for his motto.