I have extremely sensitive painful gums and the dentist prescribed toothpaste but its not helping?

See your dentist. If it is your gums that are painful/sensitive, you may have a condition called anug which is treated by gum treatment not toothpaste. If your teeth are sensitive and toothpaste is not helping, there are other treatments available that a dentist can apply to the teeth to help the sensitivity.
Be more specific. Painful gums can be from infection, or abscess, advanced periodontal disease, anug, etc. There are many causes for your gums to be sensitive... Are they irritated, are you brushing to forcefully? Many reasons....
Try another. If toothpaste isn't the answer, try another dentist called a periodontist. They specialize in gums and maybe they can better diagnose the problem and prescribe an effective treatment.
Gum or tooth pain? Is your sensitivity in the teeth or gums ? Desensitizing toothpaste such as sensodyne is usually prescribed for sensitive teeth not gums. If it is your gums that are painful and sensitive i would seek another solution.
Soft brush. Use a soft brush, brush lightly including the gums even if they bleed, and use floss. Also, use a toothpaste like sensodyne.