Which sentence is grammatically correct?
What are the elements in the poem that make it joyful.
What are the elements in the poem that makes it joyful.
This question is too basic; it can be definitively and permanently answered by a single link to a standard internet reference source designed specifically to find that type of information. See the FAQ for guidance on how to improve it.
The subject of make is the plural elements, whether you regard that as a relative pronoun or whether, like some grammarians, you don't. It follows that the verb must be plural, so make.
The first one. The second one could be correct if you wrote it as:
Or more simply:
You should probably choose which instead of what, because you have a finite set of elements to choose from.
That being said, make should be used as the plural verb for elements, which is referred to by that.