What isn't addressed in other answers is where the claim comes from. Without understanding the claim, they fail to counter it. In particular, they all rely on the common English versions of the verses, where the claim arises from analysis of the original Hebrew.
And one of the complications is that nearly every English translation adds a key word that may be substantially changing the reading of the verse. As per enegue's answer, the common translation is something like "You shall not lie with a male as with a woman; it is an abomination." - but the word "as" is an English addition. A literal translation of the Hebrew reads something like this:
With (a) male you shall not lie (the) lyings of a woman. (An) abomination is that.
Source
This does not fully capture the meaning, of course, but it demonstrates the issue. Without that joining word, "as", it could just as easily be read as "lying with a man is wrong in the same way as lying with a woman"... which has led some to suggest that it's extending the previous rules against incest to apply equally to male relatives, something like "Sexual intercourse with a close male relative should be just as abominable to you as incestuous relationships with female relatives" (as a paraphrase, not a translation).
To make matters more complex, the context must also be accounted for. As you have noted, the verse immediately before it has nothing to do with sex - instead, it has to do with sacrifice of children to Moloch. Its presence in the middle of a list that seems otherwise to be a list of sexual acts that are forbidden is curious, and any valid interpretation must account for this. If the intent was to rule out things that Canaanites were doing, you would think that sacrifices to Moloch would come either before or after sexual prohibitions, not in the middle.
Moloch was, according to some interpretations, a fertility god. It is not unusual for pagan fertility rituals to involve sex and sacrifice of children. There is also good reason to think that bestiality would fall into the same category, given that Moloch was represented as a man-bull hybrid. It has therefore been proposed by some that the verse (and all of the others in the same chapter) is referring to ritual sexual acts.
Another observation that has been made is that the verse does not use the Hebrew word for Man, but the word for Male. This is unusual, and while it could be read as an intent to separate "adult women" from "girls" but applying the prohibition to all men and boys, it is still an unusual choice of wording. More notably, it doesn't prohibit boys sleeping with boys, only men sleeping with males. What's interesting about this is that, at least according to some, in Greek culture at the time, pederasty was quite common... but they would refer to it as "men sleeping with males" (in Greek). The parallel is certainly suggestive; whether it's meaningful or not is certainly up for debate. This theory has also been suggested.
To specifically address something said by Dottard - the fact that Leviticus 18 (and Leviticus 20) may only apply to some subset need not mean that all other cases are acceptable. To assume otherwise is to assume that incest with your niece is acceptable, as it is not included in the extensive list provided in Leviticus. More specifically, Deuteronomy provides a much more restricted list of incest that are prohibited.
What's more, contrary to Dottard's assertion, there is nothing in the Bible addressing paedophilia, directly or indirectly. Nothing in Leviticus, or Deuteronomy, or other books establishes any form of paedophilia as an abomination. Interpreting Leviticus 18 to refer to ritual acts doesn't change this in any way. Meanwhile, Deuteronomy and Exodus both address bestiality.
The final piece of evidence for why Leviticus 18 (and 20) might not be referring to general sexual activity is that, despite incest being clearly marked as bad in these chapters, some very important people in the bible committed what we would now call incest, including Abraham and Sarah (who was either Abraham's half-sister or niece).
Of course, there are counterarguments to all of this, too. The truth is not as clear-cut as the English translations would have you believe.