Democrats drafting their party's platform have unanimously approved including an endorsement of same-sex marriage, Democratic aides and gay activists say, putting the policy stance on track to be part of a major-party platform for the first time.

The party is betting such a move could energize the base without turning off independents. But it could complicate the message of swing-state Democratic candidates and those vying for the votes of African Americans, who oppose gay marriage in greater percentages than much of the population....