Dear @Ganesh,
Welcome to the Wefugees Community and thank you for your question.
We discussed similar ones a few times at this platform already. You may want to check this thread or the information provided here.
In short: As a father of a German child, you are entitled to a residence permit according to paragraph 28 of the Residence Act (Aufenthaltsgesetz). This right is based on you having custody and access rights to the child and is important that you are actually having a relationship with the child (please see this answer for more details on the so-called "Vaterschaftsanerkennung" as well). A requirement for this residence permit is that you possess a passport or you tried everything that was reasonable to obtain one. In case the immigration office is asking you to travel to your country of origin to apply for a family reunification visa, I recommend you to get some legal support.
I hope this helps and please don't hesitate to get back to us with any further questions.
All the best,
Meike