We have had trouble with this, too. It seems like the biting starts every time DD is working on a new set of teeth-- around 6 months when she got the bottom two, she started chomping. I had heard that you could smoosh their face into the breast to get them to pop off, but I never seemed to have the presence of mind to remember to do that. Somehow, when trying to break the latch with my finger I always managed to poke her gums and make things worse.
My advice would be as calmly as possible to break the latch (gently in whatever way works for you!) and maybe set your baby down beside you, saying, "no, we don't bite mommy." I usually resumed nursing after a few moments and it did take a few times.
I thought we were over it, but then along came teeth #3 & 4, and we had a couple more instances of biting, and a couple more reminders. Things have improved, though.
I would definitely not wean at this point, especially over a little biting. (Even though it DOES hurt!). My MIL stopped nursing her first after being bitten (and didn't nurse either of her other 2 children at all)...she's been asking me pretty regularly whether I've been bitten yet, and I just reply, "oh, yes, and we've had a little talk about it!"