You can apply for any number of immigration programs available. Being gay doesn’t add or detract from an application. If you are looking at the refugee route, you either need to claim I. Canada or leave your country of origin for a third country and be recognized as a refugee by UNHCR (the later doesn’t guarantee Canada as your final placement).