Wow this got away from the OP.
First, I'm assuming that you are referring to a slap thrown in anger or frustration, where the 1st party has no other way to explain justify etc. to the 2nd, or the 1st party is just a ***** (They do exist). in the heat of a confrontation BOTH parties are involved in stress and tension would be high and inhibitions will be low. It IS a Natural response whether we choose to think our race is beyond it or not, It is FANTASTIC if its an urge you can resist but it can be hard.
Second, the matter of slapping back, probably depends on the manner in which the first party slaps the 2nd originally. If it was to call attention to something or as a final 'remark' then its best to try and let it go. If it is Aggressive and/or an attempt at dominance then it is time to gauge whether or not to engage in a physical response, will it stop them? surprise them? or just start a fight? in the heat of the moment it is really hard to tell and Impossible to tell from a hypothetical situation.
Finally, the old 'don't hit girls' rule, this is something all men should try and live by, if only for those of us who do beat their wives/girlfriends and who are abusive. However this isn't a free pass, and in my time I have seen one or two relationships in which the men couldn't respond without being physical, It doesn't make things better all the time, one of those relationships kept going after they made up for him being man enough not to hit back. the other Led to further abuse and psychological problems for the man who Is now horribly afraid of women. The point of those two stories is probably that its not so cut and dry, The situation is unique in every instance and to say what should be done universally is just dumb.
And before anyone does respond with overzealous pacifism, I must reiterate, Physical response is not a go-to response it is only to be used in cases where other options(there are not Always others) are gone.