Mr Obama called on African governments to give homosexuals equal rights by decriminalising their activities during his first extended visit since taking office to his ancestral continent last month.
Homosexual acts are still a crime in 38 African countries, where most people hold conservative religious views.
Mr Mugabe told cheering supporters in Mutare that supporting homosexuality was counterproductive.
"Then we have this American president, Obama, born of an African father, who is saying we will not give you aid if you don't embrace homosexuality," Mr Mugabe was quoted as saying by the Zanu-PF supporting Herald newspaper.
"We ask, was he born out of homosexuality? We need continuity in our race, and that comes from the woman, and no to homosexuality. John and John, no; Maria and Maria, no. They are worse than dogs and pigs. I keep pigs and the male pig knows the female one."