A sheriff pleaded with the former Royal Marine to put some clothes on and get a lawyer ahead of his trial later this month.
But defiant Gough said he felt he was "appropriately dressed" and refused to cover up.
Gough was arrested by Fife Constabulary officers on the edge of Townhill, outside Dunfermline last month after complaints by locals.
He appeared at Kirkcaldy Sheriff Court yesterday for a pre-trial hearing.
Gough was held in a side room beside the building's court room – specially set up for him as other pre-trial hearings took place elsewhere.
He entered the dock handcuffed to a G4S security officer wearing only a pair of hiking boots and white socks, and clutching court papers.
He was seated on a towel in the dock as he represented himself during the 10-minute hearing.
Sheriff Richard Macfarlane said: "You appear today unclothed – is there a reason?" Gough replied: "Freedom."
The sheriff said: "It is not appropriate in the setting which you find yourself in this morning – a court of law – and there are certain standards. Appearing naked does not meet that.
"It may be that coming in as you have could be a contempt of court. I ask you, Stephen Gough, are you prepared to dress appropriately?" Gough replied: "I think I am dressed appropriately."
Sheriff Macfarlane: "You're not dressed at all."
Gough: "I think that's appropriate."
The sheriff told Gough that, as he had refused to put clothes on, he would be found in contempt of court, meaning he may face even more jail time regardless of the outcome of his trial later this month.
It is alleged Gough conducted himself in a disorderly manner in the village's Cairncubie Road on Friday.
The charge against him alleges he walked naked in a public park close to a children's play park.
Prosecutors say he refused to put on clothing or move away from the area and committed a breach of the peace.
The incident is said to have taken place on July 20.
He had been released from his last sentence, imposed after he walked naked from Perth Prison at the end of another jail term, on July 17.
Gough, 53, who gave his address as Eastleigh, Hampshire, denies the charge. He asked the court for copies of witness statements against him to be disclosed by the prosecution.
He said: "I am prepared for trial."
Sheriff Macfarlane continued the case to trial on August 23 –and pleaded with Gough to reconsider getting dressed.
He said: "I ask that you reconsider your position with how you dress when you are brought to the court for trial.
"You could find yourself yet again, as today, in contempt.
"I renew my plea to you regarding representation as well – it is in matters of this kind where instructing a lawyer could so benefit you."
Gough was remanded in custody ahead of the trial. He has spent most of the last six years in solitary confinement at HMP Perth. He has repeatedly been arrested seconds after walking free from the jail in the city's Edinburgh Road.
Last August he was jailed for 657 days for breach of the peace and contempt of court.
The breach was for leaving HMP Perth naked at the end of a previous sentence, while he was found in contempt for representing himself at the city's sheriff court while naked, Gough became known as the naked rambler after he tried to walk naked from Land's End to John O'Groats in 2003 after quitting his job as a lorry driver.
He was repeatedly arrested and served four months in Inverness Prison, eventually reaching John O'Groats in 2004.
He set off again in 2005 and was repeatedly arrested once he crossed into Scotland – serving two prison services before arriving in 2006.