The term is "disorganized attachment". It's not a good sign.
Your child is trying to build a secure spot to make sense of the world. What typically triggers this sort of avoidance of one's own parents is the lack of needs being met. When your child cries, do you respond to them or are you practicing the stoic method of letting them cry it out? Somehow, your kid doesn't think that you will meet their emotional needs and is desperately reaching out to others to meet those needs. There is an article here: http://www.psychalive.org/disorganized-attachment/ that describes disorganized attachment at current knowledge levels. There is a paragraph in that article that is key:
Disorganized attachment arises from fright without solutions. Parents can frighten their children in different, often unconscious, ways. It might be through abuse or neglect, but it could also be through unresolved trauma and loss in the parent’s own life that leaves him or her feeling afraid, which unintentionally scares the child.
I suspect that something has happened in your lives that left you feeling at a loss and highly depressed at some point in the recent past. Your child picked up on it, and felt frightened. Once a kid feels frightened, they tend to avoid what caused them fear. When it's a parent, they short circuit and you see odd behaviors like refusing to go near a parent. (Note that my quote highlights that other things besides abuse can trigger these reactions.)
The good news is that this is very fixable. I would HIGHLY recommend getting in to see a family counselor/therapist as soon as possible. A good therapist can teach both parents ways to reach out to a child and regain that lost trust. IT MUST BE DONE SOON or you'll be facing deep issues.
I would not cut off the other family. They're a secure base right now. Instead, work to regain that secure base in your own family and the child will wean away from that sort of desperate need of the other parents. Plus, they'll have both secure bases which is a major win.