But the legislation is widely supported in Ghana, where Akufo-Addo has said gay marriage will never be allowed while he is in power.
Commonly referred to as the anti-gay bill, the sweeping legislation received sponsorship from a coalition comprising Christian, Muslim and Ghanaian traditional leaders, and passed through an unopposed voice vote.
While discrimination against LGBTQ people is common, no one has ever been prosecuted under the colonial-era law.
Under the provisions of the bill, same-sex relations could be punished with imprisonment ranging from six months to three years.
Those advocating for LGBTQ rights could be subject to harsher penalties, with potential jail terms of three to five years.
UN rights chief Volker Türk condemned the passing of the bill.
“I call for the bill not to become law,” he said. “Consensual same-sex conduct should never be criminalised.”