What's the context in the "Hail" part of Hail Mary?
According to the Catholic Church, does Hail (or Ave) in the sense that Gabriel uses it in Luke, actually have anything to do with addressing royalty?
The short answer is no. The Koine Greek means rejoice or be glad and not hail as in an official salutation to royalty or authority.
The Latin word Ave is often translated to mean ”hail, be well”.
Latin greeting, meaning ‘hail, be well’. According to Suetonius' Lives of the Caesars, gladiators in the arena saluted the Roman emperor with the words, ‘Ave Caesar, morituri te salutant [Hail Caesar, those who are about to die salute you].’
Ave atque vale Latin for ‘hail and farewell!’
When the Archangel Gabriel addressed Mary for the first time, he probably spoke these words in Aramaic. St. Luke wrote the Marian Salutation in Koine Greek. Gabriel’s first words were to reassure the Virgin Mary that he was genuinely sent by God.
The first of the two passages from the Gospel of Luke is the greeting of the Angel Gabriel to Mary, originally written in Koine Greek. The opening word of greeting, χαῖρε (chaíre), here translated "hail", literally has the meaning "rejoice" or "be glad". This was the normal greeting in the language in which the Gospel of Luke is written and continues to be used in the same sense in Modern Greek. Accordingly, both "hail" and "rejoice" are valid English translations of the word ("hail" reflecting the Latin translation, and "rejoice" reflecting the original Greek).
The word κεχαριτωμένη (kecharitōménē), here translated as "graceful ", admits of various translations. Grammatically, the word is the feminine perfect passive participle of the verb χαριτόω (charitóō), which means "to show, or bestow with, grace" and here, in the passive voice, "to have grace shown, or bestowed upon, one".
The text also appears in the account of the annunciation contained in chapter 9 of the apocryphal Infancy Gospel of Matthew.
The second part of the prayer is taken from Elizabeth's greeting to Mary as recorded in Luke 1:42: "Blessed art thou among women, and blessed is the fruit of thy womb." Taken together, these two passages are the two times Mary is greeted in chapter 1 of the Gospel of Luke. - Hail Mary
The Greek kecharitomene for full of grace means favored by grace or graced.
Hail Mary, full of grace, the Lord is with you.
Luke 1:28 "And coming to her, he said, "Hail, full of grace, the Lord is with you."
The Greek kecharitomene means favored by grace, graced. Its tense suggests a permanent state of being "highly favored," thus full of grace. Charity, the divine love within us, comes from the same root. God is infinite Goodness, infinite Love. Mary is perfect created goodness, filled to the limit of her finite being with grace or charity. - In Sacred Scripture
Here follows the Hail Mary in Aramaic along with a transliteration:
ܫܠܳܡ ܠܶܟ̣ܝ̱ ܒܬ̣ܽܘܠܬܳܐ ܡܰܪܝܰܡ ܡܰܠܝܰܬ̣ ܛܰܝܒܽܘܬ̣ܳܐ.
ܡܳܪܰܢ ܥܰܡܶܟ̣ܝ̱.
ܡܒܰܪܰܟ̣ܬܳܐ ܐܰܢ̱ܬܝ̱ ܒܢܶܫ̈ܶܐ.
ܘܰܡܒܰܪܰܟ ܗ̱ܽܘ ܦܺܐܪܳܐ ܕܰܒܟܰܪܣܶܟ̣ܝ̱. ܡܳܪܰܢ ܝܶܫܽܘܥ.
ܐܳܘ ܩܰܕܺܝܫܬܳܐ ܡܰܪܝܰܡ ܝܳܠܕܰܬ̣ ܐܰܠܗܳܐ.
ܨܰܠܳܝ ܚܠܳܦܰܝܢ ܚܰܛܳܝ̈ܶܐ.
ܗܳܫܳܐ ܘܰܒܫܳܥܰܬ ܘܡܰܘܬܰܢ
ܐܰܡܺܝܢ܀
Shlom lekh bthulto Maryam malyath taybutho, moran 'amekh. Mbarakhto at bneshe. Wambarakhu firo dabkarsekh moran Yeshu'. O qadishto Maryam yoldath Aloho. Saloy hlofayn hatoye, hosho wabsho'at u mawtan. Amin.
For those who desire to listen to the Hail Mary sung in Aramaic the following YouTube video is amazing: Shlom Lech Maryam (Hail Mary) in Aramaic with Arabic,and English script ماجدة الرومي