Harry Potter has some transparent characters I would like to throttle, and a style of prose that is clunky, basic and functional. This is fine for children's literature, but it's not exactly adult reading.
Lord of the Rings is on a whole different level (and so is the Hobbit, which could be more fairly compared to the Potter books). He didn't just use the English language excellently and intellectually (it is
heavy going, I agree...), he also had to go and make another language to play with. The plot is also far more developed, and less linear and repetitive than Harry Potter.
I can see why Harry Potter is considered enjoyable and entertaining, and I'm thankful for the incredible positive effect its had on children's literacy and love for reading. But for a deep and intelligent story, Lord of the Rings has no equal: it's the big daddy of fantasy fiction.
And the films aren't half bad, either.