I'm from the Netherlands, so I don't know whether cultural differences are very big with regard to such topics. But here, making rude remarks/jokes about LGBT people is certainly inappropriate in most regions and even frowned upon.
I think, if you haven't had such a conversation already, the first thing you should do is to explain to your relative that you're not comfortable with that sort of conversations. Just explain it like you said here:
You want him to stop only in front of you. Make sure to mention this is about you, that he's free to be however rude he wants to be when around others, but that right now you'd like him to remember that you don't appreciate such jokes/remarks.
Explain that you're willing to keep a good relationship with him, that you wanted to say this just so you wouldn't pent it all up and explode one day. Ask them if they think they could be considerate about this, so you can keep having all the good things you're having together now.
You might also explain that you know LGBT people and that such jokes are really hurtful, that they are equal to calling the relative a < insert something appropriate here >. Maybe, if you draw a parallel between his jokes and turn them around to something he does understand and have experience with, you might get some empathy. But proceed carefully, whether or not this will work is something you'll have to judge based on your relationship with your relative.
You can ask him to stop, and hopefully, he respects you enough to honor your wishes. But it's just as likely he won't ever completely stop this (he might forget who he's talking to in the heat of the moment) or just think you're overreacting. In that case, here's some more ways to handle the remarks as they come up.
I have a father that's very religious and pretty outspoken on these issues sometimes. He knows we don't like it when he makes certain jokes/remarks. When an openly gay celebrity is on tv presenting a show, he often made remarks (he still does now, but less often). Because he already knows we don't like his remarks, here's what we did/do:
Ignore it. Don't laugh at the joke, stop the conversation, have a little awkward pause and continue where you were before the conversation was interrupted by the rude remark/joke. Now, this works because he is our dad. It might be perceived as rude to obviously ignore somebody so obviously.
Diversion tactics. Again, don't laugh if it's meant as a joke. Instead of stopping and having an awkward pause, immediately continue the conversation on another topic. This works especially well when the conversation was already going in the direction of LGBT topics/ famous LGBT people. The downside to this is that it does mean that you might never be able to discuss these things normally with him, especially in a one-on-one talk.
Peer pressure. If there are more people in the group that think of his jokes/remarks as inappropriate and are willing to show this, it might make him think twice about making such remarks. Just make sure you're not ganging up on him and bashing him completely. Just one person saying 'Mmm, that wasn't really nice' while the rest nods to show agreement is good enough.
That's not funny/nice. Call them out: you already mentioned you don't appreciate the remarks/jokes. State again that you don't find it funny. Change the topic or end the conversation altogether. Again, this is pretty passive aggressive and it really depends on how your relative reacts to this whether this may be something you can try more than once.
Hopefully, by showing your unappreciation of these remarks/jokes, the relative will start making them less and less, just like my dad.