Fifty-one percent of those polled by CNN said they believe same-sex marriage should be recognized as valid by the law, while 47 percent said they think it should not be recognized as valid; 2 percent had no opinion.
The poll, which surveyed 824 adults nationwide, had a margin of error of 3.5 percentage points.
The survey comes as congressional leaders have been sparring over the Defense of Marriage Act, the 1996 law that bans recognition of same-sex marriage. House Republicans have hired former Bush administration solicitor general Paul D. Clement to serve as outside counsel on the legal fight over DOMA, which has been brewing since the Obama administration announced in February that it would no longer defend the law.
The CNN poll results are on par with the results of a March Washington Post-ABC News poll showing that 53 percent of respondents believe same-sex marriage should be legal. That poll represented the first time a majority in a Washington Post-ABC News poll backed same-sex marriage.
Attitudes toward same-sex marriage are split along party lines, according to the cross-tabs of the CNN poll. Sixty-four percent of Democrats and 55 percent of independents believe same-sex marriages should be legally recognized, while 71 percent of Republicans say they should not.
Sixty-seven percent of self-described tea party supporters say same sex-marriages should not be legally recognized, according to the CNN poll.