Here is how generally look at this subject. If Healing is one of the deity’s portfolio elements, then no, they won’t turn away people (NPCs) even if they cannot pay. There are plenty of other ways for a temple to make money other than making everyone pay for a cure disease spell. If the temple is in a large city, it undoubtedly has wealthy patrons, for example. Tithes will come in the coffers on a fairly regular basis. Donation drives can had, and you have all of those adventuring clerics and paladins that are always good providers of income for the church.
Clerics in D&D don’t have the same kinds of expenses that a real-life hospital has, so the economics needn’t be the same.
As far as how I deal with player characters that are seeking their services, well that is just a little different.
Unless one of the PCs is known as a devoted member of that particular faith, they will be expected to pay. The adventurers are out purposely putting themselves in Harm’s way. The minor clerics of Pelor who are out trying to prevent the small outbreak of Cholera in the Old City section of Greyhawk from turning into a full blown epidemic, can’t be expected to "waste" their spells on glory-hounds and thrill-seekers for free, now can they?

If they can’t pay (as opposed to don’t want to), they still won’t be turned away, but what I like to call the 'Godfather Factor' kicks in ("Some day…and this day may never come…I may ask you to return this favor…").
As far as raising the dead is concerned, even the clerics of Healing gods down play this ability in my campaign. I once had a player who was playing a NG cleric of Pelor, temporarily become an outlaw because she was "stealing" villages. A high level party was traveling and visiting small backwater villages that they had used as base camps earlier in their career. They were using their abilities to help the villages do rather mundane but important things such as constructing public works, healing the sick, using magic to ensure bumper crops, etc. The party felt they should return something the communities that had gotten their start in.
Needless to say, they were becoming quite famous for their generosity and began to develop a legendary status among the people. Then this player said, "Oh, and if there is anybody in town that died prematurely, I raise them as well, assuming that the family wants them raised." Well, this caught me a little by surprise, since all my players know that resurrections aren’t exactly common in my game. Her bringing the dead back to life really impressed the villagers, and soon she had a large group of commoners follow her everywhere she went in quasi-worship. These villagers told other villagers in the other towns they visited, and soon her following was growing out of control.

To make an already long story shorter, the king -- who was receiving reports of some new cult that was depopulating whole villages -- soon declared her an outlaw and a dangerous heretic. In the end it was all sorted out without bloodshed, or prison time, and it lead to some great sessions.