Edit: I apologize for the over-generalization in the title. I understand that obviously Africa is a diverse continent. I guess my interest is mostly in Uganda, Zimbabwe, Mauritania, Nigeria, Gambia, and Kenya; however, input on trends in other regions is of course welcome. Thanks for your time.
This is discussed in the book Boy-wives and Female Husbands: Studies of African Homsexualities edited by Steven Murray and Will Roscoe. I'm afraid it's a while since I read it and I don't have a copy to refer to, so this is only my memory of their argument - if you really want to know more you should check out the book.
They point to a lot of different traditions that were to some degree accepting of male-male or female-female sexual interactions, although not necessarily in a way that maps easily onto our modern understanding of homosexuality. I.e. a sexually monogamous male/male 'couple' would be a pretty peculiar thing in most of Africa, but in some societies a wealthy man with many wives might quite easily include male concubines in that number without it causing too much comment. They provide numerous examples of contexts in which homosexuality was tolerated, but it's usually either someone who has already 'discharged' their duties to heterosexual marriage/procreation, like a wealthy polygamous man or widow, or a phenomenon among men living separated from women for whatever reason: in one chapter they look at male homosexuality among migrant miners in South Africa, which is much evidenced in documents from the mine administrators.
Their argument in the introduction (and it's the only book I've read on the subject so I have no idea how accepted these conclusions are) is that these native traditions of homosexuality have been sort of doubly-expunged from the historical record. Firstly, white colonialists struggled to fit black homosexuality into their understanding of race. Black people were viewed as 'closer to nature' than white people, whether in the patronisingly positive sense of 'noble savages' or just simply due to being viewed as animals. In either case, the idea was that black people, being closer to nature, couldn't possibly engage in anything as unnatural as homosexuality. Therefore even during colonialism, a lot of African homosexuality was viewed by the colonialists themselves as the result of their own, corrupting influence on the innocent savages. Postcolonial African intellectuals largely accepted this view, and have associated homosexuality with Western colonialism, so evidence of pre-colonial homosexuality has been misinterpreted or forgotten.
I hope that's helpful - I'm certainly no expert but I thought it might be a useful answer anyway. I'd highly recommend the book if you want to know more, and I'm sure you can find more sources on this issue in the bibliography.
I want to remind everyone reading this thread and thinking of commenting, about our rules. Specifically no current events.
I would ask that everyone try and remember to keep it historical, and try to answer the central question OP poses about origins, and influence of colonial era or missionary Christianity (or Islam, presumably).
Comments that only or primarily discuss present day events are not allowable.
One more thing.
If you do reply, I would also like you to remember our rules about sources. Mentioning "what I saw when I was in a development agency..." or "while I was traveling in Africa" and basing an answer on that is not acceptable because there is no way to verify anecdotes
This is not a complete answer, but may be helpful in forming one.
I found this paper which discusses homosexuality in the Caribbean, which is perhaps not unrelated to your question.
As part of their analysis, the authors trace the impact of non-British religious and cultural attitudes to homosexuality (section IV), including African ones. They mention that the Akan culture of West Africa included bi-sexual deities among their gods, which hints that pre-colonial Akan cultures may be accepting of homosexuality.
Edit: typo-fix from slytherinspy1960.