I can't seem to think of any examples in the Bible where Jesus attempts to heal but with no success. He is after all, the son of God! However, people do sometimes think that Matthew 13:54-58 and Mark 6:1-6 (same account) is an example of where Jesus "failed" to do any miracles. Matthew says:
"’Isn’t this the carpenter’s son? Isn’t his mother’s name Mary, and aren’t his brothers James, Joseph, Simon and Judas? Aren’t all his sisters with us? Where then did this man get all these things?’ And they took offense at him. But Jesus said to them, 'A prophet is not without honor except in his own town and in his own home.' And he did not do many miracles there because of their lack of faith.” – Matthew 13:55-58
The Mark account says:
"’Isn’t this the carpenter? Isn’t this Mary’s son and the brother of James, Joseph, Judas and Simon? Aren’t his sisters here with us?’ And they took offense at him. Jesus said to them, ‘A prophet is not without honor except in his own town, among his relatives and his own home.’ He could not do any miracles there, except lay his hands on a few sick people and heal them. He was amazed at their lack of faith." – Mark 6:3-6
It sounds like Jesus is unable to perform miracles because of these folks’ lack of faith. However, Jesus is the son of God, God in the flesh. He showed power over infirmities (John 9:1-7), the laws of nature (John 6:9-11 and 19), material objects (John 2:1-10), the demonic realm (Matthew 12:22) and even death itself (John 11:43-44 and John 20:1-18). So what is going on in Matthew 13 and Mark 6?
In Matthew, the account says "he did not" and in Mark it says "He could not." One appears to say he chose not to heal and the other appears to say he didn't have the power to. Both essentially say the same thing (that Jesus didn't perform many miracles in his hometown because of a lack of faith on the part of some), but the language employed is slightly different. I believe the varying language in each account can be resolved by looking at the Mark expression from another verse in the Bible.
In one of his parables (Luke 14:16-24), Jesus tells of a great banquet where the master invites many guests. One of these men (verse 20) said "I just got married, so I can't come." Obviously, if you read the entire parable, these are all just excuses. The man who recently got married could have come but was choosing not to.
I believe this is the same expression of speech the Bible used in Mark 6:5 where it says "He (Jesus) could not do any miracles there." I believe the best interpretation of this is that Jesus simply Chose Not to do many miracles there. In fact, we know from that same verse 5 of Mark 6 that he still ‘laid his hands on a few sick people and healed them’. Given both accounts, other areas in scripture where we see this same expression of language, and Jesus' power and authority, it is best to understand that he is choosing not to perform many miracles for these people given their hostility and attitude towards him.
In regards to the disciples, we know that Jesus called them and gave them the ability to heal:
“Jesus called his twelve disciples to him and gave them authority to drive out impure spirits and to heal every disease and sickness.” – Matthew 10:1
“Now a man who was lame from birth was being carried to the temple gate called Beautiful where he was put every day to beg from those going into the temple courts. When he saw Peter and John about to enter, he asked them for money. Peter looked straight at him, as did John. Then Peter said, ‘Look at us!’ So the man gave them his attention, expecting to get something from them. Then Peter said, ‘Silver or gold I do not have, but what I do have I give you. In the name of Jesus Christ of Nazareth, walk.’ Taking him by the right hand, he helped him up, and instantly the man’s feet and ankles became strong. He jumped to his feed and began to walk.” – Acts 3:2-8
However, in addition to these and many other examples we see in scripture of the disciples healing powers, there are instances where the disciples, although they prayed, had no success in healing the one they prayed for (Matthew 17:14-20, Mark 9:14-29). Again, these are two accounts of the same story. Jesus, however, having all power and authority as mentioned earlier, was able to heal this demon possessed boy and cast out the demon and the resulting seizures. When the disciples asked Jesus why they couldn't drive out the demon, he says in the Matthew account,
"Because you have so little faith. Truly I tell you if you have faith as small as a mustard seed, you can say to this mountain, 'Move from here to there,' and it will move. Nothing will be impossible for you.” – Matthew 17:20
In the Mark account when asked why they couldn’t heal the boy, Jesus says,
"This kind can come out only by prayer and fasting." – Mark 9:29
These two statements do not contradict one another. We must assume that these two accounts (while written by two different men, are authored by the Holy Spirit) want us to know that it takes both faith, and prayer & fasting to heal and cast out some demonic influences.
This could begin to get into other questions like ‘why does God heal some, while not healing others?’ I know we are not tackling that with this question, so I'll leave it here and say I believe Jesus is teaching us something in these accounts. He is telling us to stretch our faith and increase it, and to focus more on prayer & fasting. All the other objections and rabbit holes that one could go down on these verses begins to miss the point that God wants us to fill up more on Him and trust Him more. He wants us to have greater faith and partake in a more robust prayer life and take time to fast. He is God and we are not. We as mere human beings cannot begin to understand everything in the Bible or God himself. However, we have eternity for that. Isaiah 55:9 says "As the heavens are higher than the earth, so are my ways higher than your ways and my thoughts than your thoughts."
Elder – NEO Church