In trying to understand Nietzsche's analysis of the "herd" (the masses who suffer and feel ressentiment), there are two fundamental facts to keep in mind. First, they are powerless. Second, like all things, their fundamental drive is the will to power. Because they are powerless, this will to power is re-routed and delayed at all turns, and yet they would rather (to borrow Nietzsche's phrase) will nothingness than not will.
In saying that the ascetic priest serves as a sick doctor to these sick masses, Nietzsche is suggesting that the ascetic priest directs and channels their degenerate wills to power. The three channels offered here are an extinction of the will, hard work, and the consciousness of sin and guilt.
The extinction of the will is mostly associated with Indian philosophy, and has come to the West largely thanks to Schopenhauer. The Hindu ideal of reuniting with Brahman and the Buddhist ideal of Nirvana both laud the extinction of the ego and the total disappearance of the distinct self into a greater whole. The water drop, so to speak, ceases to see itself as a water drop and comes to see itself as a part of the ocean. This is the paradigmatic example of choosing to "will nothingness rather than not will." The will here turns against itself, finding in itself something that it can overpower. The more it overpowers itself, the weaker it becomes.
In hard work, the will ceases to direct itself against itself, but rather at everything else. The result, however, is the same. The individual becomes lost in work and in the community of workers, becoming a part of a congregation rather than an individual. The individual will weakens by seeing itself in service of a larger community.
The self-flagellation brought about by a consciousness of sin and guilt ultimately serves only to increase the feelings of sin and guilt. Again, the individual's will is turned against itself, mortifying each thought and deed as sinful, and seeing the consequent suffering as just punishment.
In each of these cases the will is exercised, but the result is never a strengthening of the will. In each case, the will becomes "tamer," less capable of asserting itself and dominating others. Thus, the ascetic priest does nothing to "cure" the "sickness" of the "herd." But it would be a mistake to see the ascetic priest faced with the alternative of teaching the members of the herd to assert and affirm themselves as individuals and not choosing it. The priest does not have a "cure" at hand that he refuses to administer. Rather, he is faced with the alternatives of leaving the herd to allow their wills to collapse altogether or to lead them to some sort of exercise of their wills. Any assertion of the will, Nietzsche argues, is life affirming. The exercise of the will that the ascetic priest encourages in the herd is thus a life affirming opposition to the displeasure they feel at their suffering. Life is a struggle for which they are not strong enough, and the ascetic priest encourages them not to give up entirely but to find an alternative outlet for their weak wills. The result is that the herd develops bad taste and bad health, but this is still better than nothing.