This is a serious topic and it is sad that OP is not able to produce any thread that isn't America-centric, because the effects of this law will be predominantly felt in Ghana, not in the US. It is also not a 'genocide'. Come on now. Words have meanings.
This law is horrible. It will endanger gay people. I sincerely hope the Ghanaian president will not sign it and it won't become the law of the land. If a big majority of democratically elected representatives voted for this, there is, however, nothing 'undemocratic' about it. The will of the people is sometimes horrible. The law is definitely not in line with liberal democracy as we know it in the West, and it undoubtedly infringes on people's fundamental rights, but let's be precise with our language here.
To not mention the role of radical evangelicals (who make the otherwise great philosophy seem bad) would be a disservice to someone new to the topic.
Anyways banning an identity is pretty darn illiberal. I guess it’s not technically undemocratic but it does go against the general spirit of why we pursue democracy in the first place.