Why it's probably not sulfites
Have you ever heard of a salad bar headache? Or a raisin headache? Or even a white wine headache? These all contain more sulfur compounds than red wine. Of course, if these things give you an allergy or asthma-type of reaction then it's probably the sulfur. Sulfur can cause breathing difficulty in asthmatics--that's why the warning label is present. Sulfur doesn't cause headaches.
It might be tannins
This is a naturally occurring compound found in grape skins and seeds. If only red wines give you problems and not whites this may be the culprit as white wines don't get the skin contact during wine making. The heavier, darker the wine the more skin contact and the more tannins. Of course, black tea is also loaded with tannins.
If this sounds like the issue then drink water before and during wine consumption and try lighter red wines like Pinot Noir and Grenache.
|There's lots of stuff in wine|
image from enobytes.org
If wines can cause allergy-like symptoms try taking a non-drowsy anti-histamine beforehand. If this solves the problem then you know the cause.
You may find certain varietals or even wine from certain growing regions are fine while others are not.
Or it might be an overdose of alcohol
If a glass of wine causes the problem then it's not from drinking too much. If three glasses or more give you headaches then have a couple aspirin before drinking and drink a glass of water for each glass of wine.