Black spots on your gums can most commonly be either amalgam stains, or melanine spots.
If you use to have silver fillings, these can cause amalgam stains in the gums when they are removed.
If you are a Black or Indian person, or have black ancestors, you might have melanine spots on your gums.
It is best to have them checked by a dentist just to make sure it is not something bad.