She's TWO. It's not a reasonable or deserved response, biting is a perfectly normal age appropriate (if unpleasant) phase, the right way to deal with it is to consistently offer them something else to bite (frozen teether is great), reiterate that no, biting is not OK, supervise between biting-phase child and any vulnerable people, and they grow out of it. And try to stay aware of the pre-bite signs and move any potential victim (or indeed the child) out of the way.
OTOH, although your mum's response was wrong, I think it was an understandable response from her as well. Less so than the toddler, because she is an adult and should know better, but it is the kind of thing, if repeated, you'd have been encouraged to punish with a smack or biting back if you go back 30 years or so (certainly if you go back further than this) and pinching was sometimes done as an alternative to smacking. And I think modern parenting does often let behaviours go further than old school parenting ever would have done, so it can result in a situation where the previous generation respond instinctively or in a way they feel used to work better, even though they may well understand that the modern response is different. The messages that they received when parenting will still be in place for them and it's not quite the same logic that we use today.
Old school parenting logic - nip something in the bud and it won't get worse. Use fear/pain as a last resort if absolutely necessary, used sparingly, it does no harm.
Modern parenting logic - some behaviours take a bit of time to abate. Patience is helpful, there's no need to ever use fear/pain as a discipline technique, as it can be damaging to the trust between parent and child. If something still doesn't go away then you need to look for the root cause.
She's done it meaning well, intending to help you and using the knowledge and experience she has of childrearing. Which doesn't mean it was helpful or the right thing to do. IME though, most people who still stick to the old school parenting logic only see the first part of the modern parenting logic, and miss the part in italics, so worry/assume that there is no alternative to the "last resort" that they had to fall back on. Her intention may have been to show you that it worked and that it didn't cause any lasting harm. I think this massively missed the mark, and was disrespectful of your parenting approach, but I believe that she genuinely thought what she was doing was something helpful and intended to relieve a burden of guilt on you. She also may not actually be aware of the extent to which the view has changed - she probably knows that physical discipline is now frowned upon, but it was 30 years ago as well, even though the prevailing logic did include it as a last resort, just not to the extent it is now. She may not be aware of the magnitude of the change in attitude and therefore the distress it would cause you.