“One party in one house of Congress should not stand in the way of millions of Americans who want to go to work each day and simply be judged by the job they do,” Mr. Obama said in a statement. “Now is the time to end this kind of discrimination in the workplace, not enable it.”

Senator Harry Reid, the majority leader, said on Thursday that “the time has come for Congress to pass a federal law that ensures all citizens, regardless of where they live, can go to work not afraid of who they are.” He noted that a vast majority of Americans already think such a law is in place. “Well, it isn’t already the law,” he added. “Let’s do what the American people think already exists.”

Senate Republicans who voted against the bill, known as the Employment Nondiscrimination Act, were muted in their opposition. The first senator to rise and speak against the bill on the floor all week was Dan Coats of Indiana, who said Thursday morning that religious freedoms were at risk, despite the bill’s broad exemption for religious institutions.

Those exemptions, he said, did not go far enough.

“We can’t pick and choose when to adhere to the Constitution, and when to cast it aside,” Mr. Coats said. “The so-called protections from religious liberty in this bill are vaguely defined and do not extend to all organizations that wish to adhere to their moral or religious beliefs in their hiring practices.”

The bill includes a number of protections for religious entities, some of which were added this week to gain more Republican support. It now contains a provision that says no federal agency or state or local government that accepts money from the federal government can retaliate against religious institutions for not complying. This would include actions like denying them tax-exempt status, grant money, licenses or certifications.