Let's see, the speaker tries to hold some sand in his hands and just can't do it. And it upsets him. Looks like defeat, smells defeat, so it must be defeat. The second stanza of this poem isn't the most pleasant thing in the world, partly because it's all about failure. In addition to showcasing the emotions that come with defeat, "A Dream Within a Dream" also suggests that any attempts to determine if reality is, you know, real will always end in failure. It's the bummer of all bummers.
Attempts to uncover the nature of reality will always end in failure; the sand will always slip through one's fingers.
Defeat doesn't have to be defeat. Here's what we mean by that: despite his failure to hold sand in his hands, the speaker still refuses to believe that life just a dream within a dream. He just won't give up.