Is 你好，北京 grammatical? Today Victoria Beckham tweeted it. But is this reverse form (as opposed to 北京，你好) correct?
Both are correct!!
你好，北京 is more like a casual greeting, e.g. Hello World! :D
北京，你好 is more like a greeting with a touch of respect, because you address the name first. Examples are, 张老师，你好 (Teacher Zhang, hello).