Republicans in the New York Senate agreed Friday to allow a full vote on legalizing same-sex marriage, setting the stage for a possible breakthrough victory for the gay-rights movement in the state where it got its start.