The Court of Appeals ruled Thursday that people who have raised children but do not have a biological or adoptive relationship with a child can still be recognized as their legal parents. The ruling covers both same-sex and opposite-sex couples, but advocates said it will be especially beneficial to gay parents whose routes to parenthood are often more complicated and less well-protected in the law.