Actually, it's not all that impossible some people make it out to be. (I'm still skeptical, but I'm giving my thoughts why it's not completely absurd.)
The reason this trick can work, I believe (feel free to correct me if I am wrong), is due to the effect of water tension of the layers of water that make contact with the glass/table.
At the regions where water makes contact with the glass and table, the water molecules are able to arrange into flat sheets. The strength of such a sheet is surprisingly high as the molecules are able to set into an ordered arrangement alongside the glass/table. This arrangement allow the sheet to be held fixed together by hydrogen bonds, which are of strength comparable to ionic and covalent bond (which are the bonds that hold molecules together). Hydrogen bonds exist between water molecules as a result of the properties of water's internal bonding.
Lift a glass in such a way to not disrupt the layers (which is what I find rather peculiar here), and you have a surface of water that is capable of containing the water above it with standing some tension. I guess, it is analogous to a balloon, or even a bubble. Poke the surface, though, then a region can no longer sustain tension, and the rest of the surface pulls back rapidly by the remaining tension in the water surface, leaving the contained volume of water no longer supported, and it collapses.