The Maryland Senate voted Thursday evening to legalize same-sex marriage, the latest sign of growing national recognition of such unions among gay and lesbian couples.