This sentence originally comes from the seminal treatise on semiotics, "The Meaning of Meaning" (Ogden and Richards, 1923), where it was used to illustrate how some kinds of information can be derived from grammatical structures, even without knowing the referents of the words involved.

That would be the end of the story if it were not for a science fiction author names Miles J. Breuer, who liked the sound of the sentence and made it into the central feature of his 1930 short story, "The Gostak and the Doshes". In this story, the sentence is a political slogan that drives a nation to war, despite being completely meaningless.

From there, it entered the fan community as a catchphrase and in-joke, as well as a source of ready-made nonsense words. Use of the sentence seems to have declined since its glory days in the 1930's, but it has never completely disappeared. As with many obscure things, the internet is taking a key role in spreading gostak-awareness to the new generation.