While pain-sensitive breeds like Chihuahuas are common perpetrators, any dog may bite if hurting, depending on the degree of pain.
An otherwise gentle dog will bite a beloved owner's hand trying to soothe, bandage or examine wounds.
Of course, any dog can be provoked to bite by overly zealous physical disciplining.