Subject or subject complement
In the sentence "What is it that makes us happy?", is 'what' the subject or the subject complement?
Does 'that' refer back to 'it' or to 'What'?
Solution 1:
The it in "What is it that makes us happy?" is called syntactic expletive which is also known as dummy pronoun (or dummy it):
It is a word that performs a syntactic role but contributes nothing to meaning.
It is also called cleft sentence and you can visit the link for further study. As the below quote indicates, the role of "it" is controversial and you need to read more sentences and grammar books to fully understand when it is referential and when it is not.
The role of the cleft pronoun (it in the case of English) is controversial, and some believe it to be referential, while others treat it as a dummy pronoun or empty element. The former analysis has come to be termed the "expletive" view, whereas the latter is referred to as the "extraposition" approach. Hedberg (2002) proposes a hybrid approach, combining ideas from both takes on the status of the cleft pronoun. She shows that it can have a range of scopes (from semantically void to full reference) depending on the context in which it is used.
If you change the sentence from an interrogative sentence to an declarative one, you will get:
It is what that makes us happy. (What is a subject complement here while it is the subject of the sentence.)
If you omit "It is" and "that", you will get:
What makes us happy.
If you change it back to an interrogative sentence, you will get:
What makes us happy? (It has the same meaning as "what is it that makes us happy?")
They syntactic function of "it is" and "that" is to emphasize the word that precedes "that". For example, "I saw him yesterday." could be changed to:
It is I that saw him yesterday.
It is him that I saw yesterday.
It is yesterday that I saw him.
Each sentence has a word in bold that is being emphasized by the construction.
Going back to your question, the subject is not what, but dummy it and what is a subject complement. The it is just a syntactic expletive (dummy it) that has no meaning in the sentence.
[Wikipedia]