Sour food hurts my gums?

It. May be due to a condition called ulcerative gingivitis where your gums have little ulcers or sores that are open and when you get sour foods or acidic foods next to these areas it will sting quite a bit.
Need to floss daily! Your gums are inflamed and have open open bleeding microscopic capillaries that sting/"smart" when they come in contact with the citric acid present in most sour foods. (like rubbing a lemon on a paper cut!). Floss daily without skipping and use a vibratory brushing technique at your gum tooth interface and enjoy those "sweetarts!".
Gums. Acidic foods can irritate the gums, avoid excessive consumption.