How do denominations that ordain women at the same time justify not ordaining homosexuals? There are many verses in the New Testament that outline the role of women in the church.

1 Corinthians 14:34: Women should remain silent in the churches. They are not allowed to speak, but must be in submission, as the law says.
A woman should learn in quietness and full submission. I do not permit a woman to teach or to have authority over a man; she must be silent. (NIV, 1 Timothy 2:11-12)

And 1 Peter 3.
These verses seem crystal clear, yet many denominations, if not most, now allow women to participate equally in all areas of church government including leadership.  Some of those same denominations use the Bible to justify not allowing homosexuals to participate equally in all areas of church government.
The following New Testament passages deal with homosexual actions:

For this reason God gave them up to dishonorable passions. Their women exchanged natural relations for unnatural, and the men likewise gave up natural relations with women and were consumed with passion for one another, men committing shameless acts with men and receiving in their own persons the due penalty for their error (Rom. 1:26–27).
Do you not know that the unrighteous will not inherit the kingdom of God? Do not be deceived; neither the immoral, nor idolaters, nor adulterers, nor sexual perverts, nor thieves, nor the greedy, nor drunkards, nor revilers, nor robbers will inherit the kingdom of God (1 Cor. 6:9–10).
Now we know that the law is good, if any one uses it lawfully, understanding this, that the law is not laid down for the just but for the lawless and disobedient, for the ungodly and sinners, for the unholy and profane, for murderers of fathers and murderers of mothers, for manslayers, immoral persons, sodomites, kidnappers, liars, perjurers, and whatever else is contrary to sound doctrine (1 Tim. 1:8–10).

So, my question is, how can those churches follow some scriptures and not others? How do they explain it?
There's really nothing comparable between the two issues: no one thinks that being a woman is sinful, but many Christian denominations think that all sex outside of heterosexual marriage is sinful.

When we look the passages which give the criteria for church leaders such as 1 Timothy 3 we see several distinct criteria:


being above reproach
a husband of one wife
self controlled and not a drunk
hospitable
able to teach
not violent or greedy
takes care of his own house
not a recent convert
well regarded in the community


Some of these are inherently vague - an elder is not to be a recent convert, but Paul doesn't specify what "recent" means. Some people might think that five years is still too young a Christian, others think that only one or two is acceptable. Others would take the principle more generally, and say that the time a person has been a Christian doesn't matter, but how spiritually mature they are does.

Similarly, the requirement that they're the husband of one wife is contentious. Does it just prohibit polygamous husbands? What about divorced husbands? What about single men?

It's clear that Paul assumes the elders will be men. But is that an assumption we can do away with, or is that an essential part of the role description? Christians disagree greatly over that question. Some churches will not appoint women to be elders/ministers/priests, others will. Both sides have good arguments.

But what is indisputable is that the candidate's moral character cannot be ignored. I only listed some of the prohibitions in 1 Timothy 3, Paul gives more! No one who is in unrepentant sin is qualified to lead a church. If a church thinks that homosexual sex is sinful then they can refuse to ordain people in homosexual relationships while ordaining women without being inconsistent in the slightest.