The prayer's first half is scriptural and ancient, combining the angel Gabriel's greeting to Mary at the Annunciation in Luke 1:28 with Elizabeth's greeting at the Visitation in Luke 1:42, both first century Greek text translated into Latin along with the rest of the Gospel. The second half, holy Mary, mother of God, pray for us sinners now and at the hour of our death, has no scriptural source at all and is a considerably later addition, appearing in devotional use from the late medieval period and only fixed into the standard form used across the Roman Catholic Church with the Roman Breviary of 1568, issued in the wake of the Council of Trent, so the familiar prayer as recited today is a composite of first century Gospel Greek and sixteenth century standardization rather than a single unified ancient text.
That second half became one of the more contested points of the Reformation precisely because it does not merely praise Mary, which reformers generally tolerated as scriptural, but petitions her directly to intercede, pray for us, a practice Protestant reformers rejected on the ground that intercession should be sought from Christ alone rather than through Mary or the saints. The prayer accordingly became, and to some extent remains, a marker of confessional identity: its recitation, particularly of the added petitionary half, distinguishes Roman Catholic and Eastern Orthodox devotional practice from Protestant traditions that generally retain only the scriptural greeting, if any part of the text at all, precisely because of this sixteenth century addition rather than because of anything in the prayer's Gospel derived opening.