The way it is usually used, out of ignorance, it's definitely wrong.
Though, it seems to be the case that people use potentially hurtful slang against themselves or their friends and it becomes ok, at least to them.
It's exactly as offensive as "******-rigged," "Indian giver," and "Jewed him down."
If people used the word "Irish" or the word "Hindu" the way you use the word "gay," would you even have to ask the question?
Yes.
I see people use certain words like that and the question is still relevant. Context is important.
Examples:
-My first college roommate was a lesbian, and she used the word gay a lot in jokes, including the phrase "that's so gay". Some of her friends did as well.
-I know a coworker who is of polish heritage that uses the phrase, "Well, I'm Polish" every time he messes something up or misunderstands something.
-Some of my friends have teased another friend about an Asian stereotype. She's always playing video games and her car is full of really cute stylistically Asian toys, so every once in a while someone will be like, "You're so asian." and she laughs and sometimes uses the phrase herself.
-There have been times where I've been really scared by a spider or something and my partner would be like, "Geez Lyn, you're such a girl!" and proceed to take care of it. And it doesn't bother me.
In those contexts, that type of humor or insult seems to be used as a way of recognizing and appreciating differences (such as pointing out stereotypes and laughing about them if they are true in some ways), or it can be a way of demonstrating that they are comfortable with their self and aware of jokes and stereotypes about who they are and just brush them off (like the guy who points out his heritage whenever he makes a mistake). It's also kind of a measurement or display of how thick someone's skin is. Whether people will brush things off or get all bent out of shape about them.
It may not be the most healthy type of humor, and I avoid it myself because there's really no upside to using it but a lot of potential downside, and it's kind of low-brow humor in my opinion anyway. But there are definitely different levels of it depending on context.