Vet at FirstVet answers:
Some cats develop black pigmentation in their mouth as they age. This development is similar to when people get more liver spots with age.
If the spots are raised, red, develop discharge or bother your cat you should consult a vet. In this case it could be a sign of a cancerous change.