I would understand the meaning if someone said "He gave in his homework" but I would use and expect to hear "He handed in his homework".
As far as your original question is concerned, "
Have you given in your essay to teacher and she said that there were errors is essay but didn't say what were those?" is not correct. It would be better as "Are you saying/Are you telling me that you handed in your essay and then your teacher gave it back saying that it contained errors but without telling you what those errors were?"
It's not an easy sentence to construct. To be honest, it's not entirely necessary to mention that the essay was handed in. It would be impossible for the teacher to comment on it if it had not been handed in.
Did your teacher not tell you what the errors in your essay were when she gave it back to you?