Can you get pimples in your mouth?
Abscess not pimple
A "pimple" located on the gums several (5-8) millimeters away from the gumline would often be a nerve that has gone bad in the tooth and either root canal treatment or tooth removal are recommended treatment.
If it is located close to the gumline, then that is a periodontal (gum) abscess. See your dentist if you have any swelling in your mouth.