plummy, of course the baby's gums will create pain if they are clamped on your finger.
The gums should be not be doing this to the breast or the nipple.
I am sorry you felt pain despite what you felt was a good latch - I know this can happen sometimes, but I can honestly say that if I see a mother in pain because of sore nipples, and I include the ones who have been told the positioning and attachment is fine, I can almost always help her to feed without pain, or with considerably less pain, and so can most fully-trained breastfeeding counsellors and other people who know what to look for and just as importantly, know how to suggest changes to the mother.
As I say, it's only 'almost' always that this positive change happens - there's a lot we don't know about sore nipples, and some women have persistent pain despite what looks like a fine attachment. You may have been in this category.
On other occasions, tongue tie can cause pain, but this usually should be spotted by anyone who looks for it. There may be some hard to spot tongue ties, even so.