Only a specialized lawyer can guide you properly. I can give you some preliminary information.
If you have described your situation correctly (it is amazing how common it is that people do not understand their own situation), it seems to me that it is okay to include GPL code in an MIT project since sources using GPL clearly contain information that that code is under GPL license. It needs to be clear that that snippet has more restrictions than the rest of the code and that it can not be used in the same way.
You must include the copyright information, the copy right and the GPL license text. This should be in all source files. Of course, the full license text can be referenced for a file contained in the repository.
One suggestion is to contact the maintainer of the GPL project and ask if what you are doing is ok for it. A lawyer will require this to be in writing and to be from someone who has been proven to have the authority to sign it. Which is very difficult to achieve.
This is my understanding of the license but may not be everyone's. I've seen a lot of discussion about this. This is the problem of asking about legal issues in a development site.
So the ideal is to leave well separated the part that is GPL, even to facilitate who wants to replace this part. Preferably in another repository. If this is not possible, you may have problems (although I have never seen a process for GPL license violation).
Just keep in mind that you can not change the license of the GPL code and you can not leave any door open for anyone who uses your code to be confused for your cause and end up using the GPL part improperly.
On the other hand, if your project is difficult to decouple the GPL and MIT parts, in practice you have a GPL project. After all nobody can use part of the project in one way and another part of another. GPL is viral, meaning it contaminates everything that is close to it.
Particularly I would not put GPL code in a project that I wish to be MIT. I could use something GPL to make some optional component or it can be completely separate from the MIT part. So I guarantee that the MIT part can be used as the same MIT.