Film - The Wicker Man, not only because the 'twist' is so clever but also because that final shot with the pagans dancing as the sun goes down and the structure burns is just perfect.
Book - two possibilities for me.
First, the original Restaurant at the End of the Universe, in which our heroes discover that the answer to the ultimate question is wrong: "I always thought there was something fundamentally wrong with the universe."
Second, Elmore Leonard's Get Shorty. At the end, he's wrapped up all the loose ends and it's not clear what happens next. If I recall, the final line is: 'I never could get the hand of endings'.