There is likely a little more going on here that is veiled by the somewhat prudish language of the passage. Credit for this interpretation goes to the late Dr. Michael Heiser.
In Genesis 9, "Ham, the father of Canaan, saw the nakedness of his father, and told his two brethren without."
Noah wakes up and curses... Ham? No, his son Canaan, who (if we go strictly by the available text) is completely innocent. That's why I reject Nehemiah6' explanation; it simply is not justified by the text, and looks suspiciously like a convenient anachronism that does nothing to address Ham's sin.
Here's another perspective:
In Leviticus 18, Moses relays God's instruction, "The nakedness of thy father's wife shalt thou not uncover: it is thy father's nakedness."
Consider the two bolded phrases: why would God call "the nakedness of thy father's wife", "thy father's nakedness", or in different word order, "the nakedness of (his) father"? Why would the wording be so similar? Why is Canaan cursed instead of Ham?
Consider the possibility that Canaan was Ham's son by Noah's wife! In the culture of the day, Ham had attempted to usurp the rulership of the family by "going up on his father's bed" (as would Reuben in a later generation). Noah shuts down Ham's claim by making clear that the offspring of that attempt would be but a slave rather than a legitimate part of the family.
Dr. Heiser explains this far better than I have done, so any who are curious are encouraged to locate his version for further study.