Answer:
first you're going to want to make sure that this is really what you want to do. Also, make sure this person is in fact gay. You don't want any awkward situations. Then, it's pretty much the same as asking anyone out, you just have to build up the courage and say it. One technique that many people use is asking the person if they have a crush on anyone which usually gets them to ask you and then pretty much there's your opportunity. And a piece of advice, go for it, because you never want to have to think of what could have been if you had asked.