As a logical matter: while いけない is usually considered as just an expression (or rather part of an expression), it's really the negative (as one would expect from its construction) of いける. We get a sense that the negated meaning is "isn't good; doesn't go well with; doesn't suit the situation" (like 合わない, but stronger - strong enough that it can be used to imply a prohibition, or as seen here, a requirement).
Japanese has a strong tendency to treat double negatives logically, rather than using them for emphasis (as in some Romance languages; English is somewhere in the middle). If not-continuing to wait is impermissible, it follows that waiting is obligatory. It's said this way because simply using a positive verb form wouldn't be able to create that sense of obligation - there's no explicit "must" modal, so the sense has to be created by excluding alternatives.
The same thing happens with the collocation しかない (which can be separated to some extent). しか is a particle analogous to は, but it adds a meaning of "other than". However, it's also a strongly negative polarity item, so it's only found with verbs in a negative conjugation. Supposing それしか言わなかった: if things other than "that" were not said, it follows that "that" is the only thing that was said.
So if I'm thinking straight, something like 待つことしかない should be roughly equivalent to 待っていないといけない, too. (As naruto says, the と is conditional, so it gives a sense of hypothesis; whereas しかない expressions simply assert that there is no choice.)