Paul W. answered 04/04/19
Dedicated to Achieving Student Success in History, Government, Culture
The simple answer is 'Christianity'. The fundamental message of Christianity was that the destiny of all men and women was eternal life after death. Whether eternity would be spent in a state of pain or happiness depended on one's behavior in their life on earth. Because one's temporary existence on earth was nothing when compared with the potential of eternal rewards in heaven and eternal punishment in hell, one's life on earth was framed by Christians as a preparation for life after death, important only insofar as it was an opportunity - through correct behavior - to earn a place in heaven and, thus, avoid going to hell.
Such an outlook was in direct contrast with the commonly followed philosophy among the elite within the Roman Empire (which was at its height when Christianity began to find converts). In essence, the wealthy and powerful believed in living for the moment, in seeking all forms of pleasure before death permanently closed the door on access to pleasure (the Romans, like the Greeks, had a rather pessimistic view of the afterlife). Sensual pleasures were pursued, including many different permutations of sexual activity.
Christianity, of course, inherited a great deal from the Jewish Faith, including its rigid restrictions on what sexual activities were acceptable to God (something that was unique among the religions of the ancient world). Christian converts were taught that the sole purpose of sex was procreation, any sexual activities that were not intended to or could not achieve this goal were sinful in the eyes of God and, thus, were an obstacle in attaining life's true purpose, earning one's self a place in heaven. Thus, Christian leaders condemned homosexual activity and, once Christianity became the official religion of the Roman Empire in the 4th century, homosexual activity was made illegal by the State.