The bones of Elisha raised a dead man
The earliest reference to a divine miracle happening through the remains of a holy person is in the Old Testament when a dead man came into contact with the bones of Elisha the prophet and the man was resurrected.
Elisha died and was buried. Now Moabite raiders used to enter the country every spring. Once while some Israelites were burying a man, suddenly they saw a band of raiders; so they threw the man's body into Elisha's tomb. When the body touched Elisha's bones, the man came to life and stood up on his feet.
—2 Kings 13:20-21 (NIV)
The cloak of Jesus healed a woman with twelve years of hemmoraging
In the New Testament, a woman touched Jesus' cloak and was healed of bleeding of twelve years.
And a woman was there who had been subject to bleeding for twelve years. She had suffered a great deal under the care of many doctors and had spent all she had, yet instead of getting better she grew worse. When she heard about Jesus, she came up behind him in the crowd and touched his cloak, because she thought, “If I just touch his clothes, I will be healed.” Immediately her bleeding stopped and she felt in her body that she was freed from her suffering.
—Mark 5:25-29 (NIV)
The story is also described in in Luke 8:43-48. Although in that account, Jesus says to her that "your faith has healed you", this is consistent with the belief that it is not the relics themselves that contain the power, but rather that God chooses to work through them in response to the faithful.
Handkerchiefs and aprons touched by Paul healed sick people
God did extraordinary miracles through Paul, so that even handkerchiefs and aprons that had touched him were taken to the sick, and their illnesses were cured and the evil spirits left them.
—Acts 19:11-12 (NIV)
The three examples are also the basis for the three classifications of relics that Catholicism uses. The bones of Elisha would be a first-class relic, the cloak of Jesus a second-class relic, and handkerchiefs that Paul touched would be a third-class relic.