Even if he has a problem with the word marriage (as a religious institution), he is moving us in the right direction and has said in the states eyes (government) there should be no difference between Marriage and civil union/marriage. Here are some of his view expressed.
From http://www.ontheissues.org/Domestic/Barack_Obama_Civil_Rights.htm#Gay_RightsDisentangle gay rights from the word "marriage"
Q: If you were back in the Illinois legislature where you served and the issue of civil marriage came before you, how would you have voted on that?
A: My view is that we should try to disentangle what has historically been the issue of the word "marriage," which has religious connotations to some people, from the civil rights that are given to couples, in terms of hospital visitation, in terms of whether or not they can transfer property or Social Security benefits and so forth. So it depends on how the bill would've come up. I would've supported and would continue to support a civil union that provides all the benefits that are available for a legally sanctioned marriage. And it is then, as I said, up to religious denominations to make a determination as to whether they want to recognize that as marriage or not. Let each denominations decide on recognizing gay marriage
Q: The laws banning interracial marriage were ruled unconstitutional in 1967. What is the difference between a ban on interracial marriage and a ban on gay marriage?
A: We've got to make sure that everybody is equal under the law. And the civil unions that I proposed would be equivalent in terms of making sure that all the rights that are conferred by the state are equal for same-sex couples as well as for heterosexual couples. Now, with respect to marriage, it's my belief that it's up to the individual denominations to make a decision as to whether they want to recognize marriage or not. But in terms of, you know, the rights of people to transfer property, to have hospital visitation, all those critical civil rights that are conferred by our government, those should be equal. Legal rights for gays are conferred by state, not by church
Q: You have said in previous debates that it is up to individual religious denominations to decide whether or not to recognize same-sex marriage. What place does the church have in government-sanctioned civil marriages?
A: It is my strong belief that the government has to treat all citizens equally. I don't think that the church should be making these determinations when it comes to legal rights conferred by the state. I do think that individual denominations have the right to make their own decisions as to whether they recognize same sex couples. My denomination, United Church of Christ, does. Other denominations may make a decision, and obviously, part of keeping a separation of churches and state is also to make sure that churches have the right to exercise their freedom of religion.