It is grammatical, it's just (intentionally) worded in a confusing way.
Note that the question and answer have the same syntax.
You see Sue sew Sue's new socks, sir.
And this has the same syntax as the following, more comprehensible sentences:
After the subject of the sentence, we have in order: a finite transitive verb, an object of the transitive verb, an infinitive, and an object of the infinitive.
Who sees who sew whose new socks, sir?
You can't say "*Who sees whom sews": that would be as ungrammatical as "*I see him sews". A finite verb like "sews" would have to have a subject, but the form "whom", like "him", is usually* used only when the pronoun is not the subject of a finite clause. Seuss's "Who sees who sew whose new socks, sir?" is syntactically equivalent to "Who sees whom sew whose new socks, sir?" The use of the word "who" as an object pronoun instead of "whom" in contexts like these has been common for centuries, so I would not consider it an error.
The sentence is a direct question containing more than one interrogative word, which is rare but not impossible. That may have contributed to your confusion. In a direct question with a single interrogative word, the interrogative word or phrase is usually moved to the front of the sentence, and the subject and verb are inverted with do-support if appropriate: for example, a sentence like "He saw Sally" corresponds to a question like "Who(m) did he see?", and a sentence like "He saw Sally do something" corresponds to a question like "What did he see Sally do?" However, in a direct question with multiple interrogative words, the later ones stay in place, as in the question "Who saw who(m)?", or "Who(m) did he see do what?"
The verb "see" can be used with an infinitive after the direct object describing what the object is doing; e.g. "I saw her do it." I think it's not used very much in the present tense, but the Dr. Seuss sentence is contrived and unnatural in various other ways. The construction is nevertheless grammatical.
The "Who sees who sews whose new socks, sir?" construction would also have been grammatical, but Seuss may have avoided it because in that case the embedded clause would have the same form as an indirect question, which might not be interpreted as a request for information. For example, a question like "Who knows who sews new socks?" might receive an answer like "I know who sews new socks". In Seuss's sentence, the occurrence of a third interrogative pronoun "whose" later on might disambiguate it, but starting out the sentence with "Who knows who sews..." still might cause the reader to go down a "garden path" of misinterpretation. In fact, looking at "Who sees who sews whose new socks, sir?", I find it very hard to interpret it with the meaning Seuss intended for his sentence.
*almost always, really; there are only a few exceptions of disputed acceptability (which I won't go into in this answer, but which you can see described on the following page:
The use of nominative "whom" (as in “persons whom it is foreseeable are likely to...”)).