Developer Thornhill Estates Limited argued that its proposals for the site off Calverley Lane at Farsley would make a valuable contribution towards meeting housing demand in the area.
However, a planning inspector ruled that the benefits of the scheme, including provision of affordable housing, were outweighed by planning policy objections.
The project, he said, would conflict with housing land allocation policies in the local development plan and cause harm to the area's character and identity.
The communities secretary agreed with him and outline planning consent was refused in March this year.
In ruling on the developers' challenge to that decision, Mr Justice Stewart could find no error in the secretary of state's approach to housing land supply issues.
However, the judge identified a "serious problem" in his decision letter which meant that it had to be quashed and the matter reconsidered.
Between the date of the inspector's report and the secretary of state's decision, Leeds City Council had withdrawn an interim policy concerning protected areas of search (PAS).
The secretary of state had failed to take account of that change in circumstances and his decision contained "significant factual errors" as a result.
There had also been a material error of law in that the secretary of state had not understood or had regard to the interim policy's withdrawal.
The judge concluded: "He gave no reasons for not considering the withdrawal and, in the circumstances of this case, it would be inappropriate for the court to attempt to plug the gap which the secretary of state has left".
Thornhill Estates Limited v Secretary of State for Communities and Local Government. Case Number: CO/1791/2015