What do you mean that it's wrong?
I wonder whether different examples can shed some light:
How can you say [that] it's wrong?
There doesn't seem to be anything odd about the nominative subordinate clause "[that] it's wrong". To my eye, it looks like an direct object. It's the thing that can be said.
The part that seems odd is that "how can you" and "why would you" express the same sentiment in this context. That doesn't hold true in other contexts. Questions like "how can you eat so much?" and "why would you eat so much?" expect different answers, such as a high metabolism and a low self-esteem respectively.
However, that's a question of modality which we can ignore for the moment.
What do you mean that it's wrong?
Why do you say that it's wrong?
The subordinate clause still appears to be a direct object. These two questions seem to express similar sentiments and expect much the same range of answers. Both questions allow the original statement to be supported or explained, or for the implications of that statement to stand as an answer.
The oddity here is that the "what" in that question acts like "how" and "why" usually behave. "How" and "why" are adverbial interrogatives. They can be parsed as adjuncts rather than arguments. Ordinarily, "what" is a pronominal interrogative, which isn't a suitable adjunct on its own.
We can explain this oddity if we assume an elision:
What do you mean [by saying] that it's wrong.
Here, "that it's wrong" is the direct object of the gerund "saying". The entire prepositional phrase "by saying that it's wrong" is an adjunct to the verb "do mean", while "what" acts as its direct object.
If we do not assume the elision, the next obvious possibility is that "to mean" allows "what" to act as an adjunct. The questions "what do you mean that it's wrong?", "how do you mean that it's wrong" and "why do you mean that it's wrong" expect similar ranges of responses, even though we've progressed from the utterly unsurprising to the highly questionable.
The elision seems easier to support.
How do you mean that it's wrong?
You mean that it's wrong, but how?
Given a clear adjunct, we can separate the question that it asks from the statement that it modifies. The same doesn't hold for "what":
What do you mean that it's wrong?
*You mean that it's wrong, but what?
Once the verb "mean" has an obvious direct object, the word "what" no longer makes sense. It doesn't act like an adjunct from other positions, even though we haven't changed the governing verb.
What do you mean that it's wrong?
You said that it's wrong, but what do you mean?
This transformation practically begs for the restoration of at least one elided word.
- The "that" makes it an indirect content clause/reported speech. The "that" is necessary to avoid the possible implication that "It's wrong" is exactly what was said.
- This is an expression that would appear in print only in dialog. It is essentially colloquial.
- "What do you mean" is an idiom (not a simple assembly of the meanings of its components). It is an expression of annoyed or angry challenge of something spoken by the auditor. If there is emotion being expressed, then one could also expect the expression to omit some terms that might make the grammar clearer, for example, "What do you mean (by saying/when you say) that it's wrong?" Those two possible omissions lead to different grammatical analyses.
- I agree with the statements of the prior answer.
The OP has asked about the following interrogative, which seems perfectly grammatical to me (AmE, Upstate NY):
- What do you mean (that) it's wrong?
In particular, the question concerns the syntax of the phrase "that it's wrong."
I think the best way to approach this question is by setting aside the interrogative for a moment and considering its simple declarative variant:
- I mean that it's wrong.
In sentences like these, the that-phrases seem to be functioning as simple content clauses, which is a type of subordinate clause. In these types of clauses, 'that' acts as a complementizer and is entirely optional, evidenced by the following variant of (2):
- I mean it's wrong.
The analysis which appeals to content clauses is the standard analysis of sentences containing propositional attitude verbs like 'believes', 'thinks', 'says', etc. These verbs take content clauses as their complements.
- I believe (that) it's wrong.
- I think (that) it's wrong.
- I say (that) it's wrong.
Unfortunately, the analogy between 'means' and propositional attitude verbs breaks down when we consider the possibilities for interrogatives. The attitude verbs easily take 'why', but 'mean' does not:
- Why do you believe (that) it's wrong.
- Why do you think (that) it's wrong.
- Why do you say (that) it's wrong.
- ? Why do you mean (that) it's wrong.
Further, 'mean' easily takes 'what', but the attitude verbs do not:
- *What do you believe (that) it's wrong.
- *What do you think (that) it's wrong.
- *What do you say (that) it's wrong.
- What do you mean (that) it's wrong.
There is even a disanalogy with synonyms of 'mean' (for example 'intend', 'express', and 'convey'), none of which pattern with interrogatives in the same way as 'mean'.
Given this data, all I can say at the moment is that in the OP's construction, the that-phrase seems likely to be a content clause complement of 'mean'. What remains to be explained is why 'mean' doesn't pattern with interrogatives in the same way that the other propositional attitude verbs do. Maybe it has to do with an elided 'saying' as @Rathony suggests. (This last idea seems more likely than holding that 'mean' is simply a sui generis verb, unlike the other propositional attitude verbs.)
[I'll continue to think about this and (substantially) edit my answer if I come up with anything.]