Breaking a sentence into grammatical structures
的时候 is an interesting way to construct time markers in Chinese, it means "when (something happens...)".

In your example, the whole 6 characters in 你想走的时候 are part of the ...的时候 construct, which matches your first translation, i.e. Whenever you wish to go, just go. or Anytime you want to go, just go. 

Well, the best resource to train your "parser" is just reading a lot, text books for the most part. And sometimes breaking up a sentence can be hard, that's normal, but the more experience you have, the better you will be at it.