Maryland lawmakers are drawing up legislation that would grant gay couples many of the same rights as married people, a measure that would bring the escalating debate over same-sex marriages into the State House this winter.