Gay rights advocates from both parties are newly upbeat about the prospects for Senate passage of legislation that would bar employers from discriminating against workers on the basis of sexual orientation or gender identity.

The outlook for the Employment Non-Discrimination Act reflects the nation’s growing tolerance of homosexuality and the GOP’s political calculation as it looks for supporters beyond its core base of older voters.

The first test vote is Monday.

“I think society continues to evolve on the issue of gay rights,” said Sen. Susan Collins, R-Maine, a co-sponsor of the measure. “As more and more gay individuals are open about their sexual orientation, people come to realize that they are their neighbors, their family members, their friends, their co-workers. That’s made a big difference.”

Opinion polls underscore Collins’ assessment.

A Pew Research survey in June found that more Americans said homosexuality should be accepted rather than discouraged by society by a margin of 60 percent to 31 percent. Opinions were more evenly divided 10 years ago.

In a sign of the times, the anti-bias legislation has traditional proponents such as the Human Rights Campaign, the largest gay and lesbian advocacy group, plus the backing of a relatively new group, the American Unity Fund. That organization has the financial support of big-name Republican donors — hedge fund billionaires Paul Singer, Cliff Asness, Dan Loeb and Seth Klarman — and former GOP lawmakers Norm Coleman of Minnesota and Tom Reynolds of New York.

“Most conservatives believe people in the workforce should be judged on their merits,” said Jeff Cook-McCormac, a senior adviser to the fund, which has focused on gay rights initiatives in New Jersey, Minnesota, Rhode Island and Delaware. “They shouldn’t be judged on characteristics that are irrelevant in a productive employee.”

Current federal law prohibits discrimination on the basis of sex, race and national origin. But it doesn’t stop an employer from firing or refusing to hire workers solely because they are gay, lesbian, bisexual or transgender.

The bill would bar employers with 15 or more workers from using a person’s sexual orientation or gender identity as the basis for making employment decisions, including hiring, firing, compensation or promotion.

The Senate vote would come five months after Supreme Court rulings affirming gay marriage and granting federal benefits to legally married same-sex couples. It would be the first major piece of gay rights legislation since Congress repealed the ban on gays serving openly in the military in December 2010.

Collins said the military’s relatively smooth implementation of that law despite dire warnings have made Americans more receptive to the nondiscrimination law.

“People intuitively think that it is unfair to discriminate against someone based on their sexual orientation,” said Collins, who led the fight on gays in the military. “Just as it would be unfair to refuse to hire or fire them based on religion or race or gender. In fact, when I talk to constituents, they’re surprised that it’s still legal under federal law.”

The measure faces strong opposition from established conservative groups such as the Family Research Council. That group says the bill carves out special protections for sexual orientation, would lead to expensive lawsuits against employers, and could undercut the ability of employers to establish reasonable standards for dress and grooming.

Heritage Action said Friday that the bill would “severely undermine civil liberties … and trample on religious liberty” while potentially undermining job creation. The conservative organization called for a vote against the bill and said it would record the vote on its legislative scorecard.

It is unclear whether Republican leaders in the House will even bring the bill up for a vote after the Senate acts.

On Monday, the Senate plans a test vote, and Majority Leader Harry Reid, D-Nev., has made it clear he expects to get the necessary 60 votes to move ahead on the legislation.

All 55 members of the Senate’s Democratic majority are expected to vote “yes” on the test vote, along with four Republicans — Orrin Hatch of Utah, Lisa Murkowski of Alaska and the measure’s co-sponsors, Illinois’ Mark Kirk and Collins.

Proponents are optimistic that four other Republicans also will support moving ahead: Kelly Ayotte of New Hampshire, Rob Portman of Ohio, Dean Heller of Nevada and Pat Toomey of Pennsylvania.

The Senate could complete the bill by week’s end.

The evolution and changing views on gay rights are evident in the senators now expressing support.

In September 1996, the Senate narrowly rejected a similar measure on a 50-49 vote. That bill did not include protections for transgender people. Voting against it were Hatch and then-Alaska Sen. Frank Murkowski, father of Lisa Murkowski. Subsequent efforts over the next 17 years to secure Senate passage of the bill faltered.

This past July, Hatch, Kirk and Lisa Murkowski backed the bill when the Senate Health, Education, Labor and Pensions Committee, led by Sen. Tom Harkin, D-Iowa, endorsed the measure 15-7.