How can anyone be so naive ? If you had only known this girl for a few months, you could be excused for being naive about her background. But you come across as a intelligent and caring human being with your head on your shoulders. Then why did you not cut connections with your girlfriend’s family in so many years. Instead you have gone ahead and had a child with her. Why do men loose their common sense when they can see the reality in front of them.
You can file for custody, but whom will you take custody from. Your girlfriend is in a jam and your daughter is a hostage. Won’t it be better to file a police complaint against your girlfriend’s family for forceful abduction of your wife and daughter. Make sure you file this complaint mentioning her as your wife.
Best of luck. You will need every bit of luck and good wishes you can manage.