This sounds like To Die in Italbar (1973), by Roger Zelazny.
The plot summary, per Wikipedia:
Heidel von Hymack, known to all as "H", is a man with the power to cure people of incurable diseases. He travels from world to world healing people by touching them. However his healing powers have a dark side: after a while they reverse and he becomes a spreader of deadly diseases. Avoiding contact with others is almost impossible because of his celebrity, so his most dedicated followers tend to die horribly. He does not know why he has this power, though he dreams of a mysterious "Lady" who rules his life. In fact he has been accidentally joined to a deity of the Pei'an religion, a goddess of disease and healing whose changing moods determine whether he saves or kills.
Zelazny actually hated the book, personally. He first threw it together when he was in need of money, and he was never satisfied with the way the threads came together. His publisher rejected it anyway, so he wrote a new ending, making it a sequel to Isle of the Dead (1969). This provided the tie-in to the superpowers associated with the living avatars of the gods of alien Pei'an religion from Isle of the Dead, and thus provided an explanation of why H could both cure and cause any disease. However, Zelazny still felt the result was an inferior effort.