Teething can be very painful for babies. It’s normal for your baby to want to bite down or rub her swollen gums on something for relief...
...and your breast may seem like a good place. While your natural inclination is to pull the baby away and yelp or say "No!” that reaction may confuse or frighten your baby and cause her to go on a brief nursing strike.
Try rubbing a cold teething ring on the baby's gums before nursing or during breaks, or put crushed ice in a closed, clean sock for the baby to gnaw on. If when you are nursing you sense your baby is closing in for a bite, pull her close to your body so she will have to release to open her mouth more and uncover her nose.
If that does not work, gently un-latch her and tell her firmly, but calmly, not to bite because it hurts mommy. Latch her on again but un-latch if it happens a second time, put her down and tell her no nursing if she bites. Depending on her age she may only understand this with repetition but she will get the message that there is cause and effect. Biting equals a stop in nursing.
Be consistent! Repeat these steps every time your baby tries to bite you, and eventually she’ll get the message that biting triggers a stop in nursing.