"For if we are truly created equal, than surely the love we commit to one another must be equal as well," he added.
Obama has a complicated history on gay marriage. As a presidential candidate in 2008, he opposed the California ban but didn't endorse gay marriage. He later said his personal views on gay marriage were "evolving."
When he ran for re-election last year, Obama announced his personal support for same-sex marriage, but said marriage was an issue that states, not the federal government, should decide.
Public opinion has shifted in support of gay marriage in recent years.
In May 2008, Gallup found that 56 percent of Americans felt same-sex marriages should not be recognized by the law as valid. By last November, 53 percent felt they should be legally recognized.
Gay marriage supporters see the Supreme Court's hearing of Proposition 8, as well as a related case on the Defense of Marriage Act, as a potential watershed moment for same-sex unions.
In a well-coordinated effort, opponents of the California ban flooded the justices with friend-of-the-court briefs in recent days.
Among those filing briefs were 13 states, including four that do not now permit gay couples to wed, and more than 100 prominent Republicans, such as GOP presidential candidate Jon Huntsman and Florida Rep. Ileana Ros-Lehtinen.
Two professional football players who have been outspoken gay rights advocates also filed a brief in the California case. Minnesota Vikings punter Chris Kluwe and Baltimore Ravens linebacker Brendon Ayanbadejo urged the court to rule in favor of same-sex marriage.
The Supreme Court has several options to decide the case that would be narrower than what the administration is asking. The justices also could uphold the California provision, as opponents of gay marriage are urging.
One group, the National Organization for Marriage, expects the Supreme Court to uphold the votes of over 7 million Californians to protect marriage, spokesman Thomas Peters said.
One day after the Supreme Court hears the California case, the justices will hear arguments on provisions of the federal Defense of Marriage Act, which defines marriage as between a man and a woman for the purpose of deciding who can receive a range of federal benefits.
The administration abandoned its defense of the act in 2011, but the measure will continue to be federal law unless it is struck down or repealed.
In a brief filed last week, the government said Section 3 of the act "violates the fundamental constitutional guarantee of equal protection" because it denies legally married same-sex couples many federal benefits that are available only to legally married heterosexual couples.
Follow Julie Pace at http://twitter.com/jpaceDC and Mark Sherman at http://twitter.com/shermancourt