That's exactly how I felt about Escape from Monkey Island. The gameplay was great (although the 3D graphics were awful...), but the ending completely ruined it.
Just so it doesn’t seem that unanimous, I feel always obligated to say that I enjoyed Thimbleweed Park’s ending as well as Return to Monkey Island’s ending. RtMI ending actually grows in me each time I think or read about it. I consider now to be one of the best endings I ever saw in a game (I do not play that many games though)
Gameplay was great to that point though.