First off, I guess we should talk about "praying" to Mary.
The word "pray" and all of its various forms has a number of different meanings. Of course when we pray to God, our prayer can have several different forms - prayers of worship and praise, prayers of petition, prayers of thanksgiving to name a few.
When Catholics talk about "praying" to Mary or the saints, THEY ARE NOT TALKING ABOUT PRAYERS OF WORSHIP. And although I suppose one could point out that many prayers praise Mary or the saints, those prayers are always in reference to God i.e. Mary the obedient, Mary the humble servant, Mary mother of God. We praise the saints and Mary because they give more perfect examples of being a child of God and overcoming their sins, than we do.
The Hail Mary is actually very scriptural.
Hail Mary, Full of Grace the Lord is with you
Blessed art thou amongst women
And Blessed is the fruit of thy womb, Jesus
The account of the angel Gabriel announcing to Mary that she is to be the mother of our Savior is familiar to all Christians. We find here the first elements of the Ave Maria. The angel’s words are "Hail, O favored one," (Luke 1:28 RSV), or as Jerome translated it in his 4th century Latin edition, "full of grace."
What does it mean to be greeted as one "full of grace"? At the very least, Mary is highly favored by having been chosen to bear the Son of the Most High. The Latin translation using "full" points to the overflowing abundance and perfection involved. God Himself will dwell in her womb, the Creator will come into the world. The Holy Spirit will overshadow and dwell in her. It is all of grace. By this grace, Mary is special and blessed. The Church’s reflections over the centuries have their root in these words of the angel Gabriel, sent from God. She teaches us to look to Mary for our model of what we ourselves hope to become by God’s fullness of grace.
Mary, and we too, have the next words of the angel to assure us of His help in this. "The Lord is with you" (Luke 1:28). How many times in salvation history have servants of God heard these words? In Genesis 26:24, the Lord appears to Isaac, saying, "Fear not, for I am with you". The Lord God promises to be with Jacob (Gen. 31:3), with Moses (Exod. 3:12), with Joshua (Joshua 1:5), and with Gideon (Judges 6:16). Jesus Himself tells his accusers, "He who sent me is with me; he has not left me alone, for I always do what is pleasing to him"(John 8:29). The Lord will be with Paul in the city where He has many people (Acts 18:10). This is His promise to the Church in Matthew 28:20, "I am with you always." And in Revelation 21:3, a great voice tells us, "Behold, the dwelling of God is with men. He will dwell with them and they shall be his people and God himself will be with them." The Lord is with Mary, according to the angel, and we know He is with us. His assistance in the Old Testament has been brought to great fulfillment by His very presence with Mary in her womb. "The Lord is with you," has been a pregnant phrase throughout salvation history. And now in the Church, His real presence is with us in His Eucharist.
"Blessed art thou among women," says the prayer, in the words of Elizabeth (Luke 1:42). All the promises of blessing in the Old Testament are fulfilled with the coming of the Savior. Elizabeth, filled with the Holy Spirit, continues, "and blessed is the fruit of your womb". Mary is blessed because of her child, Son of the Most High. Elizabeth recognizes this, saying in astonishment, "And why is this granted me, that the mother of my Lord should come to me?" (Luke 1:43). Both Mary and Elizabeth are pregnant miraculously, by the grace of God, emphasizing to us that our life in God is all of grace, all by His willing and doing. We, too, are totally dependent on His grace, His mighty acts, his fulfilling of promises. In the Incarnation, Mary is blessed to have the God of the universe dwell in her womb. In the Church, we are graced to receive in the Eucharist His presence, His very body, the fruit of Mary’s womb.
The scriptural first half of the prayer ends with the name of Jesus (Luke 1:31). We are told in Acts that "there is salvation in no one else, for there is no other name under heaven given among men by which we must be saved" (Acts 4:12). Mary rejoices in God her Savior, and all generations shall call her blessed. Like Mary, we are to rejoice in God’s salvation through Jesus. Like Mary, we are blessed in the Son of the Most High. And like her, we are to be conformed to his image. "For those whom He foreknew, He also pre destined to be conformed to the image of His Son, in order that He might be the first-born among many brethren" (Rom. 8:29). Catholics believe that Mary’s sinlessness is due only and completely to the grace of her Savior, her Son. She did not earn this great privilege, but was prepared by His saving grace to shine as a promise of what we will be, when "we shall be like Him" (1John 3:2).
The second part of the prayer is a prayer of petition.
To ask (someone) imploringly; beseech. Now often used elliptically for I pray you to introduce a request or entreaty: Pray be careful.
Holy Mary, Mother of God
Pray for us sinners,
Now and at the hour of our death, Amen
Catholics strongly believe in the community of saints, that those who died in Christ are alive in Christ (who died for us, so that whether we wake or sleep, we might live with Him" (1 Th. 5:10) so we ask for their prayers, just like we ask each other for prayer. In the second half of the Hail Mary, we address Mary as the Mother of God, for indeed she is. We ask her to pray for us, admitting our sinfulness, and asking for those prayers now as we live our lives but particularly at the end of our life when most likely we will need prayer the most!
For more on the Hail Mary see