Yet if hope has flown away In a night, or in a day, In a vision, or in none, Is it therefore the less gone? (6-9)
The image of hopelessness here foreshadows the speaker's defeat in the second stanza. It also foreshadows some of the emotional pain he endures as a result.
I stand amid the roar Of a surf-tormented shore (12-13)
These lines, like lines 6-9 also foreshadow the speaker's impending defeat. The "roar" of the ocean sure sounds ominous, and the image of a shore being "tormented" or assaulted by the surf reminds us of how the sand will also torment the speaker, because it's always falling away from him. The dude just can't win.
How few! yet how they creep Through my fingers to the deep, (16-17)
The sands have a life of their own; they can "creep" through the speaker's fingers, back to the ocean. It's almost like they actively defeat him, and there's not a stinkin' thing he can do about it.
While I weep—while I weep! (18)
The speaker's weeping tells us a lot. It's clear that his attempts to prove that reality is real have ended in defeat. And he's really unhappy about it, which is why he tells us twice that he is weeping. Just so we don't forget. Not like you can't hear him all the way to China, anyways. Dude's blubbering.
O God! can I not grasp Them with a tighter clasp? O God! can I not save One from the pitiless wave? (19-22)
While these lines are questions, they are questions that imply negative answers: the speaker cannot hold the sand with a "tighter clasp" or save any grains from the "pitiless wave." He is failing, as we've been led to believe throughout the poem, and here it seems like he's admitting defeat before the battle's even over with.