It really depends.
If it's somewhere that I love, and is usually good, then, I can forgive a bad night on the part of a server or whatever, but, the thing is, there are so many restaurants, I can't ever hope to eat in all of them, so, why go back somewhere I didn't like either the food OR the service.
Bad service can actually make good food unenjoyable, and great service can make mediocre food seem better, because they compliment each other.
If I feel welcome and comfortable, then everything is in a more positive light. If I feel like I am getting on the server's nerves, and annoying them, or if I am made to feel uncomfortable then, it doesn't matter how good the food is, I won't enjoy it.