わけ means "reason", and has the same meaning as 理由（りゆう）. In some cases, the two words are interchangeable:
Nihongo wo manabu wake wa kyoumi ga aru kara desu.
The reason why I study Japanese is that I am interested (lit. I have an interest) in it.
In this case, わけ means "reason" and thus can be replaced by 理由. However, in certain common expressions, this is not the case:
1. -る form of verb + わけには行かない
This is used when you can't do something, or when you shouldn't do something. It has the connotation of being powerless to do something (that you may want to do) because it is against your principles, etc.
Dare nimo jamasaseru wake ni wa ikanai.
I can't let anyone get in the way.
Note that this phrase is commonly written in kana only.
2. -ない form of verb + わけには行かない
This is a phrase which I have never heard used, but which is included in "A Handbook of Japanese Grammar" by scholar Masahiro Tanimori (Tuttle Publishing). It creates a double negative, so it gives a meaning that you "must do something".
Kanojo wo tetsudawanai wake ni wa ikimasen.
I have to help her. (lit. I cannot not help her)
This can be preceded by:
(a) -る form of verb
(b) な (for nouns)
(c) い (for i-adjectivesadjectives)
(d) -た (for verbs and i-adjectives)
(e) -ない (for verbs)
It means "it's natural that", or "so that's why..."
Sore de okureta wake desu ne.
So that's why you're late, isn't it?
Soredewa taihen na wake desu.
If that's the case, it will of course be difficult. (lit. If that's the case, that's why it's difficult.)
It means "it doesn't mean". It can be considered the negative of #3 (it's not natural that...)
It is preceded by a verb, an adjective (in i-form or na-form), or a noun + という, giving rise to the expression +というわけじゃない。
That's not what I mean!
It doesn't mean that I agree with you on everything.
It can also be preceded by という. It means that you are denying, though not completely, the sentence that precedes という.
Kanojo wa sonna ni kirei to iu wake dewa nai.
I wouldn't say she's pretty. OR She's not that pretty.
Masahiro Tanimori, Handbook of Japanese Grammar, Tuttle Publishing, 1994
jisho.org (Online Japanese dictionary)