This is subtype of specific phobia, where you have an extreme fear of needles, and/or you have an extreme fear of blood. People with this type of phobia often have difficulty with doctor and dental visits, especially when needles, shots, and blood extraction are involved.
If you have this type of phobia, you should consult with your doctor or dentist before the procedure, so that they can help to calm you down with tranquilizers beforehand, such as with bezodiazepines.
For needle phobia, your doctor may recommend that you place Emla cream on the site to be injected, right before the procedure, to numb the area from painful pricks of the needle.
In severe cases of phobia, you may need to have anesthesia, both local (to numb the area to be operated on), and/or general anesthesia (gas via a mask to calm you and sedate you).