Matthew 14:36 and Mark 6:56 refer to the desire of the sick to touch the hem of Jesus' garment at Gennesaret. “They besought him that they might only touch the hem of his garment; and as many as touched (it) were healed.”
The woman who had been sick for twelve years came behind Jesus and touched the hem of his outer garment and was healed (Matthew 9:19-22, Mark 5:25–34; Luke 8:43–48). There is a theory that the woman touched the tzitzit (tassels, fringes) of his robe. For Jews, these indicated a nobleman or a royal person. However, the practice of touching the royal hem is much older than Judaism.
The gesture reflects a very ancient custom, as is evident by the wide geographical dispersion of the practice. It is found in the Ancient Near East, in Asia, India, Persia, and the British Isles.
Allusion to this gesture of supplication for healing is found in Christian prayers such as this one: "Dear God, I am sick and tired of being sick and tired. I reach forward today, touch the hem of Your garment, and receive my healing. Yes, I want to get well. Give me the faith to walk in freedom and victory. In Jesus’ Name, Amen." (From here.)
It is found also in this Bahai prayer: "I implore Thee to keep safe him who hath held fast and returned unto Thee, and clung to Thy mercy, and seized the hem of Thy loving providence. Send down, then, upon him Thy healing, and make him whole, and endue him with a constancy vouchsafed by Thee, and a tranquility bestowed by Thy highness. Thou art, verily, the Healer, the Preserver, the Helper, the Almighty, the Powerful, the All-Glorious, the All-Knowing." (From here.)
In Buddhism, it is not uncommon for supplicants to kiss the hems of the Buddhist monks.
In his April 1621 letter to the King, Sir Francis Bacon, wrote, "It may please your most excellent Majesty, I think myself infinitely bounden to your majesty, for vouchsafing me access to your royal person, and to touch the hem of your garment..." (From here, p. 29.)
The gesture is mentioned in ancient Akkadian prayers - sissikta ṣabātu, "to seize the hem." (From here, p. 13.)
To touch the hem is an act of supplication of royal persons or ruler-priests. It also indicates devotion to one's king or deity. In a festschrift for Nahum Sarna, Shalom Paul gives parallels from Akkadian and Ugaritic ritual prayers:
[asḫur]ki aš’ēki sissiktaki aṣbat kīma sissikti ilija u ištarija – “I [turned to] you and sought you. I grasped (aṣbat) your hem (sissikta) as if it were the hem of my own god and goddess.”
sissikti ilūtišu rabīti aṣbat ašte’â ašrātešu – “(When Marduk entrusted the rule of Assyria to me), I grasped (aṣbat) the hem (sissikti) of his divine majesty. I sought his shrine.”
sissikti Sin šar ilāni aṣbatma – “I grasped (aṣbatma) the hem (sissikti) of Sin, king of the gods.”
aššum sissikti Marduk bēlija ṣabtākuma Marduk bēlī jâti irammannima – “Because I grasped the hem of Marduk, Marduk, my lord, loves me.”
In Isaiah 6, the hem or train (ve·shu·lav) of God's royal robe is said to fill the temple.
Apparently, the practice of touching the hem of someone with authority was associated with Jews because Zechariah 8:23 says: "In those days ten men from every language of the nations shall grasp (ḫazaq) the hem (kanaph) of a Jewish man, saying, “Let us go with you, for we have heard that God is with you.”