When he learned that church leaders had objected to the language of the marriage legislation, he invited its lawyers to the Capitol to vent their frustration.

Mr. Cuomo even spoke to Archbishop Dolan about the push for same-sex marriage, emphasizing his respect and affection for the religious leader. An adviser described the governor’s message to Archbishop Dolan this way: “I have to do what I have to do. But your support over all is very important to me.”

By the time a Catholic bishop from Brooklyn traveled to Albany last week to tell undecided senators that passing same-sex marriage “is not in keeping with the will of their people,” it was clear the church had been outmaneuvered by the highly organized same-sex marriage coalition, with its sprawling field team and, especially, its Wall Street donors.

“In many ways,” acknowledged Dennis Poust, of the New York State Catholic Conference, “we were outgunned. That is a lot to overcome.”

With the church largely out of the picture, the governor’s real worry was the simmering tension in the Senate Republican delegation. Its members met, for hours at a time, to debate the political and moral implications of allowing a vote. But each time new arguments arose. Some questioned whether homosexuality was genetic or chosen. Others suggested that the same-sex marriage legislation be scrapped in favor of a statewide referendum.

Mr. Cuomo invited the Republicans to visit him at the governor’s residence, a 40-room Victorian mansion overlooking the Hudson River, just a few blocks from the Capitol.

There, in a speech the public would never hear, he offered his most direct and impassioned case for allowing gays to wed. Gay couples, he said, wanted recognition from the state that they were no different from the lawmakers in the room. “Their love is worth the same as your love,” Mr. Cuomo said, according to someone who heard him. “Their partnership is worth the same as your partnership. And they are equal in your eyes to you. That is the driving issue.”

In the late hours of Friday night, 33 members of the State Senate agreed with him.