It is my belief that when Jacob touched Jack, he gave Jack the ability to heal others with his touch, albeit against Jacks own knowledge - that is the first twist. The second twist is that Jack can only miraculously heal people when he has faith/hope.
Look at the evidence. Against all odds, he healed Sarah, simply because he believed he could fix her. Against all odds he revived Charlie after he was hung, because he believed he could do it. Admittedly Sayids revival was slightly different, but look, Jack had that moment of deep thought and belief. If just for a moment Jack has the belief whilst making contact with his subject, then that is enough to revive them.
This all relates to Jack's conversation with Christian about having "hope", in the episode 'Man of Science, Man of Faith.'
CHRISTIAN SHEPHARD: "You might want to try handing out some hope every once in awhile. Even if there's a 99 percent probability that they're utterly, hopelessly screwed, folks are much more inclined to hear that 1 percent chance that things are going to be okay."
JACK: "Her spine's crushed. I tell her that everything's going to be okay -- that's false hope, dad."
CHRISTIAN SHEPHARD: "Maybe. Maybe, but it's still hope. "
I believe the successfulness of the miracle is down to the amount of belief Jack possesses towards his subject. When Jack looked at the horrible mess Boone was in, he still tried to help him, but deep down he didn't have "hope". When Jack looked at Mr. Busoni's X-rays, he immediately said he would not operate as he didnt believe there was any hope. Ultimately, Jack did actually try to heal him, but that was only out of good intentions - he didn't actually have the belief. However, when Jack has hope/faith, he can work miracles.
I believe Jacob gave Jack the ability to heal. However, Jacks ability to heal had to evolve over time, and had to grow side-by-side with his belief in healing. So it stands to reason that when Jack doesn't really believe he can heal, then he fails. He failed with Boone, and with Gabriellas father, perhaps because deep down he didn't truly believe those people could be fixed. Yet when Jack has hope, he can miraculously heal... he just doesn't know it... yet!