Assumpta is very good about giving warning bites to my husband and me if she's getting ready to go into a full-blown biting episode, and they're pretty gentle (usually
). Some cats get easily overstimulated by petting and it may be her way of saying "Okay, I'm done."
OTOH, lot of cats get so zoned out from patting that they revert to kittenish behavior and will kind of gnaw gently on your hand in a really tranked-out, groggy sort of way. Other cats bite as part of playing.
The difference can usually be found in the cat's other body language. Look at the whiskers, eyes, ears, tail, body posture, and facial movements to see what the cat's overall mood and likely course of action is.
If you decide to discourage it, do NOT yank your hand away, make fast movements, or raise your voice a lot...that can easily escalate an aggressive episode. Go limp, and say something like "No Bite" in a quiet, yet stern way. If that doesn't work, try following this treatment by physically turning your back on the cat and ignoring her for a couple of minutes, that usually seems to get the message across. I ended up having to use cat vocalizations, followed by ignoring because Assumpta was completely ignorant of "No," but seemed to understand a cat yowl very well.
Also, make sure that you're not inadvertantly causing the cat any pain or discomfort while petting...a lot of times, older cats may have dental or ear problems that make facial petting painful and cause a reaction. Some others just have places thay don't want people touching (bellies, paws, and tails are common), and will react if touched in a "no-fly zone."