WASHINGTON — A measure to ban workplace discrimination on the basis of sexual orientation or gender identity was on the verge of securing a crucial 60 votes in the Senate on Wednesday as supporters homed in on a handful of Republicans who might be willing to back the proposal.

The Employment Non-Discrimination Act would be the most significant piece of gay rights legislation passed by Congress since the repeal in late 2010 of the military’s “don’t ask, don’t tell” ban on gay people in uniform. Senate Majority Leader Harry Reid, D-Nev., has said he plans to consider the measure on the Senate floor next week.

On Wednesday, Reid said he felt “pretty good” about having the 60 votes needed to ensure that the bill can avoid the threat of a filibuster and proceed to final passage. His hopes were buoyed by two moderate holdouts, Sens. Mark Pryor, D-Ark., and Joe Manchin III, D-W.Va., who said they would vote for the bill.

Attempts by Democrats and supportive Republicans to pass ENDA have faltered for years. A version of the measure passed the House in 2007 when it was controlled by Democrats, but filibuster threats stopped debate in the Senate.

Six years later, supporters think a combination of factors — shifting public opinion, fresh academic research and more openness among Republicans to embrace gay rights — will help advance the measure in the Democratic-controlled Senate. As for the Republican-controlled House, where passage seems unlikely, Democrats plan to use that opposition against Republicans in the upcoming midterm elections.

A multimillion-dollar lobbying effort has also helped. The Human Rights Campaign has spent more than $2 million in recent months targeting Pryor, Manchin and potential GOP supporters. The group said Wednesday that it has deployed 30 field staffers to urge supporters to send 100,000 emails and 50,000 postcards and to make about 3,000 phone calls to Senate offices.

As of Wednesday, at least 58 senators were sponsoring the measure or planning to vote for it. The tally encompasses all 52 Senate Democrats, the two independents and four Republicans — Sens. Susan Collins (Maine), Mark Kirk (Ill.), Orrin Hatch (Utah) and Lisa Murkowski (Alaska). Newark Mayor Cory Booker, a Democrat — who is scheduled to be sworn in Thursday as the successor to Sen. Frank Lautenberg, who died in June — is also expected to support ENDA, providing the 59th vote.

The pursuit of a 6oth vote is focused on four wavering Republican senators: Rob Portman (Ohio), Patrick Toomey (Pa.), Kelly Ayotte (N.H.) and Dean Heller (Nev.).

Ayotte said Wednesday that she has not made a decision, while representatives of Toomey and Heller said they are also undecided. Portman said Wednesday he is working with supporters to tweak the measure’s language regarding religious-liberties protections for employers.

“There are legitimate reasons for Republicans not to want to support this particular bill,” Portman told reporters.

A key Republican concern is the potential legal risk for employers who are perceived to be discriminating against gay or transgender employees or job applicants, Portman said. But he cited a recent Government Accountability Office report showing that states with laws similar to ENDA have not seen “the litigation explosion some feared.”

Consideration of the measure comes amid a months-long debate among GOP leaders about how the party should be pursuing young, minority and gay voters in the wake of the 2012 elections. A study commissioned by the Republican National Committee faulted GOP candidates for not doing enough to tailor their message to those constituencies, and some of the party’s top donors are focused on generating Republican support for gay rights.

The American Unity Fund, a group led by hedge fund executive and GOP mega-donor Paul Singer, has partnered with the Human Rights Campaign and spent about $500,000 on outreach, according to organizers. The group has been sharing polling data showing broader support for gay rights and offering talking points to coach would-be supporters on how to discuss gay rights without alienating conservatives.

Portman said Wednesday that his party has come up short when reaching out to gay voters.

“I don’t think anybody believes in discrimination that somebody could be fired because he or she is gay,” Portman said. “That’s something where you can find consensus in our party. We just need to be sure that we communicate that.”