Which Beatles song?
First of all, since you're asking about grammaticality, the " correct" formal way to ask this is
Which of the Beatles' songs did the BBC ban on May 20th, 1967 for its overt references to drug use?
following the recommendation of
this site about forming the possessive of a proper noun. It makes it clear, even to someone who has never heard of the Beatles, that we are selecting from a particular group's body of work and not some genre (e.g. "R&B song" or "skiffle song").
Of course, less formal writing and ordinary conversation will use "Beatles song" much more often. It's common practice to drop articles and other minor words when forming a possessive or adjective from a proper noun:
Which United States city whose name begins with 'X' has the largest population? (instead of "Which city in the United States")
Which Heat of the Night episodes didn't have Carroll O'Connor in them? (instead of "In the Heat of the Night")
Which Phillipine island is the largest? (instead of "The Phillipines")
This last example is a little more interesting: We're selecting one element out of a category with a plural name, and the resulting adjective becomes singular. (compare with the commonality of "pant leg" over "pants leg").
But "Philippine island" may not fit the category since we're talking about membership in a geographical grouping, not necessarily something that belongs to the political entity. Comparing "Philippine city" to "Philippines city" is more interesting, The plural form lagged behind for most of the period Google digitized book for, but ever since the 1990's, it's now the preferred form.