As far as I can tell, in response to a question during Q&A sessions this past weekend in Ohio, Senator Obama noted that while he did not support same-sex marriage, he did favor granting same-sex couples civil rights such as transfer of property or visiting each other in hospital. He added (because the questioner was Pastor Leon Forte from Grace Christian Center in Athens, Ohio) that if people found that controversial, his position derived support from the Sermon on the Mount which he regarded as more important than an obscure passage in Romans.
We can be pretty sure he was referring to Romans 1. But he didn't clarify which parts of Matthew 5-7 he meant. And he didn't say that the Sermon on the Mount supported same-sex unions or same-sex marriage. That would be an astonishing argument. What he seems to have done is infer that Jesus' words in Matthew 5-7 did not exclude the possibility of recognizing that same-sex couples have legal rights and that Jesus' words should be given more weight than a few verses from Paul's letter to the Romans.