Thank you for using justanswer. This is a good question, and unfortunately, due to the Uniform Definition of a Child law that congress passed a few years ago, not an easy one to answer really.
In order to claim your child as a dependent under the Qualifying Child rules, the child must be :
Related to you biologically (child, grandchild, sibling, etc)
Under age 19 (or under age 24 if a full time student)
Lived with you for more than 6 months
Did not provide more than half of their own support.
What makes this more difficult is that your child meets this criteria for both of you. This means that you 2 need to choose who will claim the child as a dependent and whether or not that person will claim the Earned Income Credit for that child also (if that person's income is <$38,000)
You could claim the child as your qualifying dependent for the more favored Head of Household filing status and your girlfriend might still be able to claim the child for the Earned Income Tax Credit (EITC) Overview
If both of you can not agree on who should claim your child, then IRS will apply the "tie breaker rules" and award the exemption/credits to the parent with the higher income
I hope this helps you
Positive feedback and bonuses are always appreciated