"what you think it is" is a content clause with the interrogative "what". To understand it, you should compare it to an independent clause:
you think it is (a dog)
There is only one "gap" here. Saying "you think what it is a dog" is incorrect, and "you think what it is is a dog" is correct, but unnecessary. The verb think can be completed by a clause like "it is a dog".
So when forming the content clause, the noun phrase is omitted and an interrogative pronoun is placed at the start of the clause: "what you think it is". No second what is required.
As suggested above "It's not what you think what it is, is" could be considered "correct", but only if you are trying to make a joke about English grammar!