Really, what was the other polite and socially acceptable option?* You can think about saying something to the effect of just ask them why in the world they would get you girly gifts and why they would think it is ok, or say to them to make sure they package up the receipts with the present, in the same way I think about my response to someone saying that to me would be a 2x4, but you can't really go there. Or, if you did I guess I'd just look all sorts of some fake astonished and taking the gift from you say: "Oh geez, I labeled that wrong, that's for X, I didn't get you anything. What was I thinking?" as I slowly turned away and went to find someone, anyone else, to talk to.
* - I checked the three major etiquette guides, Vanderbilt, Miss Manners, and Emily Post and they all are in very strict agreement that "Thank You" is the only acceptable response to any and all gifts.