It is the latest in a series of cases in which it has been alleged that rules intended to combat extremism are being used to put pressure on schools with a religious foundation.
The guidelines, introduced by the Education Secretary Nicky Morgan last year, require schools actively to promote “British values” including democracy, liberty and tolerance.
Mr Gray was a vocal supporter of the guidance when it was published. In an article on the school website he told parents: “Just as we rightly expect tolerance from others, so we must always show huge respect for those who believe differently from us, who come from different backgrounds and whose sexual orientation is different from the majority.
“That we will do – Mrs Morgan and Ofsted are only telling us to do what our own values lead us to do and hopefully this will be replicated in every school in Britain.”
But he said that when inspectors arrived unannounced before Christmas they appeared determined to find evidence that the school was encouraging intolerance.
“The view was that the Christian ethos of the school was adversely affecting our ability to be open non-discriminatory, and tolerant,” he said.
“I think that is upside down thinking.”
He said there had been a noticeable divergence between the inspectors’ feedback of discussions they had had with pupils and what he understood from the children themselves.
“Everything was as negative as it could possibly be, if there was a negative slant they could put on something they did,” he said.
In his complaint to Ofsted he added: “The tenor of the inspection was negative and hostile at every stage, as if the data collected had to fit a predetermined outcome.”
He explained: “In the feedback with the [lead inspector], it was suggested that a response from one child to the effect of querying how it is possible to have two mums was viewed as indicating a lack of awareness of lesbian relationships.
“Actually, I understand the child concerned was merely thinking in biological terms.
“In addition, I have also heard reports of primary schoolchildren being asked if they knew of any boys or girls who thought they were in the ‘wrong body’.
“Another parent has complained to me in writing that her 10-year-old daughter was asked if she knew what lesbians ‘did’.
“Pupils were embarrassed and surprised to be asked questions about sexuality.”
He added: “I am also concerned that the manner and content of questioning of pupils crossed the line into harassment.
“I am further concerned that the questioning of pupils by Ofsted crossed a line into areas which fall outside its authority.
“Under the ‘British values’ requirements, our school is under a duty to promote respect and tolerance of those with different faiths and beliefs.
“However, I am alarmed that the questions asked of pupils sought to test the pupils’ religious knowledge.”
A spokeswoman for Ofsted said: "We are committed to making sure all pupils in England receive a broad and balanced education.
"One part of how we assess this is through talking to pupils to consider the extent to which they are being prepared for the next stages in their lives.
"Ofsted is not looking for answers to questions which are contrary to their faith. Nor do we require evidence that schools ‘promote’ other faiths. Instead, inspectors must ensure that pupils are able to express views which are neither intolerant nor discriminatory towards others.
"Ofsted takes all concerns about its work seriously. We will be considering the issues raised by the school as part of our normal quality assurance arrangements."