The Republican-led House made a last-minute effort Friday to undermine the administration’s policy allowing gays to serve openly in the military, sparking a heated debate over same-sex marriage as the Pentagon ordered the armed forces to begin admitting service members without regard to their sexual orientation.