In Chinese, the adverb of place "在 a place" is put before the Verb.
If you want to say "I want to eat in a restaurant in Beijing", what you want is to eat, and you want this eating to happen in a restaurant in Beijing. The correct sentence is:
我 想 在北京的一个饭店 吃饭.
This is your sentence:
我 在北京的一个饭店 想 吃饭.
在北京的一个饭店 is immediately before the verb 想, which means the verb 想 takes place at a restaurant in Beijing. This sentence is not ungrammatical. It just means something quite different:
In a restaurant in Beijing, I want to eat.
It sounds like you are already in a restaurant in Beijing, and you desire to eat a meal. In reality, this is something rather odd, and that's why the sentence sounds strange to a native ear.