The Story Behind Kyrie Eleison (Lord Have Mercy)
In the New Testament, the Greek phrase occurs three times in Matthew:
Matthew 15:22: the Canaanite woman cries out to Jesus, "Have mercy on me, O Lord, Son of David." (Ἐλέησόν με κύριε υἱὲ Δαβίδ)
Matthew 17:15: "Lord, have mercy on my son" (Κύριε ἐλέησόν μου τὸν υἱόν)
Matthew 20:30: two unnamed blind men call out to Jesus, "Lord, have mercy on us, Son of David." (Ἐλέησον ἡμᾶς κύριε υἱὸς Δαβίδ)
In the Parable of the Publican and the Pharisee (Luke 18:9-14) the tax collector who cries out "Lord have mercy on me, a sinner" is compared with the self-righteous Pharisee who believes he has no need for forgiveness.
According to Hymnary.org,
"This ritual song dates from early Greek (Eastern) Christian liturgies and has retained its Greek text in the Latin (Western) rite. In the Eastern tradition, the Kyrie is still used in its initial capacity to respond in litanies. By the end of the eighth century in the Roman (Western) church, the Kyrie was used as a separate song, often in a nine-fold form–a three-time repetition of its three lines, in which the priest uttered the first line, the congregation or (more likely) a choir responded with the second, and the priest responded with the third. The Kyrie became part of the Ordinary (the unvarying parts) of the Roman Catholic Mass, chanted at the very beginning of the service."