Studies have shown that acupuncture releases natural opioid pain relievers in the brain: endorphins. Veterinarians have pointed out that loading a horse into a trailer or throwing a stick for a dog also releases endorphins. Probably hitting yourself on the thumb with a hammer would release endorphins too, and it would take your mind off your headache.
Ed Yong has an excellent post about the latest science relating to acupuncture. While there is a physiological response locally and in the central nervous system when the skin is punctured or stimulate with needles, there is still very little evidence that these effects have any positive effect on the progression of any disease. It is troublesome that acupuncture is still being promoted by veterinarians as an effective form of pain relief for everything from surgery to arthritis. Since our animal companions cannot really tell us if they want or enjoy acupuncture, we should be very cautious with dramatic but probably ineffective interventions like acupuncture
that may have more effect on the psyche of the owner than on the patient. The acupuncture archive at science-based medicine is also well worth a read if you have not already.