You believe you are a father, but you were not married to the child's mother at the time the baby was born. Perhaps there is some doubt about whether or not the child is yours. Perhaps the mother actually denies it entirely.
To get the right to see your child, the first step is to legally establish paternity. The court needs to know that you are the father before giving you access.
In some cases, this can be done with an acknowledgement of paternity. If you and the mother agree that you are the father, but it is simply not legally assumed because you were not married, this paperwork gives you those rights. You can do it after the child is born, but many fathers do this at birth.
In more complex cases, such as when there is dispute, DNA testing often becomes necessary. This is highly accurate and can be used to prove that you are the father, no matter what the mother claims. This does take time, but it ensures that fathers have a legal right to see their children -- and, potentially, a legal obligation to pay child support.
The key is to make sure you know what options you have and what steps to take. Never assume you are powerless. Yes, the court process can feel lengthy and you may wish you did not have to go through it at all, but it will help you get everything sorted out. You can still have the paternal relationship that you want with your child, and everything that goes along with it.