I am not a lawyer, and I am sure that there are other circumstances not gone into in your question. What you need to do is consult a lawyer that deals in family law, but my understanding is that a court would prefer that a child be with the parent(s) a opposed to any one else. Unless there are circumstances where it would be unsafe for the child. The courts first concern will be the welfare of the child.
Unfortunately, in most states the father has very few rights. Getting a family law attorney is going to be your best bet but if you can't prove that you've been a consistent part of the childs life, financial and otherwise, youve got an uphill fight.