Media playback is unsupported on your device
23 April 2015 Last updated at 17:52 BST
The Conservative Party leader added that he "profoundly disagreed" with DUP policy on the subject but refused to rule out a coalition with DUP MPs.
He made his remarks during Radio 1 Newsbeat's Live Lounge leader debate.
The DUP, which opposes gay marriage, said the party had already ruled out being part of a coalition government.
David Cameron has said he "will never validate" the Democratic Unionist Party's stance on lesbian, gay, bisexual, or transgender (LGBT) issues.