The Washington, D.C., City Council voted Tuesday to legalize gay marriage in the nation's capital, handing supporters a victory after a string of recent defeats in Maine, New York and New Jersey.