A couple say a local authority set out to adopt their grandson even though they wanted to care for him and his brother who already lived with them.
Social worker Neil Swaby, of North East Lincolnshire Council, refused to explain why he did not support their case for adoption, they told the BBC.
A judge said Mr Swaby, fellow social worker Rachel Olley and another colleague were "biased" against them.
But Unison said it was "unacceptable" social workers should "carry the can".
The union that represents council social workers said Ms Olley had been made a scapegoat in the case.
'Get used to it'
Speaking to the Today programme, the couple said they challenged the authority when it decided to put the three-year-old boy up for adoption after his mother died.
They said they asked Mr Swaby: "Who do you think you are - God?"
They said he replied: "In this situation, yes. Get used to it, your grandson will go for adoption."
Judge Simon Jack, sitting at Hull Family Court, was asked to decide on the future of the boy, known only as J.
In a ruling published on Tuesday, the judge criticised evidence given by Mr Swaby, Ms Olley and a third social worker.
Ruling in favour of the couple, he said Mr Swaby had been "very begrudging" in his evidence.
He said Ms Olley's evidence was "totally discredited" after she told the court the boy had behavioural problems, contradicting her written statement.
"I have never, in over 10 years of hearing care cases, taken the view, as I did in this case, that the local authority's witnesses were visibly biased in their attempts to support the local authority's case," he said.
"It is very unfortunate and I hope I shall never see that again."
The boy's grandfather said it was only then that he thought they might win their 16-month case.
He said: "The judge asked [Ms Olley's] advocate to stand up and he said to her, 'Basically your case is a shambles,' and he threw it out of court.
"I could have hugged that judge, I could. I've never known anything like it."
In a statement, Unison said: "This blaming culture in local authorities is likely to have an impact on an already depleted workforce. [This] type of case will only drive more social workers away from the profession."
Mr Swaby did not respond to requests for comment.
A spokesman for the council said that the authority had carefully considered the judge's comments, and that there had been a "rigorous process" to prepare the social workers to give evidence.
He said: "North East Lincolnshire Council is committed to ensuring the best outcomes for children and young people and, where possible, allow them to stay within their extended family.
"We have a growing number of young people supported in this way and we continually review and update our policies and practices to assist with that aim.
"This case illustrates the complexities and difficult decisions that have to be made while striving to act in the best interests of children."