In the wake of anonymous calls on social media for a long trek through heavily guarded Balkan borders, police said more than 500 people, including families with small children, assembled in a cornfield outside the Diavata migrant camp, which is around 10 kilometers (6 miles) west of the city of Thessaloniki.
Some set up tents as dozens more approached on foot.
Later, about 200 clashed with riot police after trying to break through a cordon. They threw stones at police who responded with tear gas and stun grenades.
No injuries or arrests were reported.
Migrants, most of whom have already requested asylum in Greece, said they planned to go to the fenced-off border with North Macedonia 60 kilometers (38 miles) away and try to push through. In early 2016, a similar route was firmly shut down after more than a million people flowed through Greece and the Balkans to Germany and other countries.
The United Nations refugee agency has denounced the social media calls, stressing that irregular border crossings are "risky and dangerous."
In a statement warning of "false information and social media rumors," UNHCR said it does not encourage or support "irregular movements," and noted that states have the right to manage their borders.
"In addition to potential unwanted legal consequences, participants in these movements may end up in dire humanitarian conditions, including being left without adequate shelter, food and other basic services," UNHCR said. "Please do not endanger your lives and the lives of your family members and children."
But people gathering outside the congested Diavata camp said they would try their luck at the border.
"We face very many problems in Greece," Iraqi Kurd Darya Wus, 35, told The Associated Press. "They give us very little money. We have no future (in Greece). My asylum hearing has been set for 2021."
He said migrants would try to get through the border with North Macedonia, despite likely opposition by police in both countries.
"We will try to talk them into letting us go on to Europe," he said.
Sajjad Hamid, 27, an Iraqi from Baghdad who has been in Greece for 15 months after entering illegally from Turkey, was planning to spend the night in a tent with his four young children. They had travelled north by bus from the central town of Halkida, where they lived in a hotel room provided by an NGO.
More than 70,000 asylum-seekers have been trapped in Greece since the 2016 border closures and a deal between the European Union and Turkey intended to stem migration flows.
Follow Kantouris at http://www.twitter.com/CostasKantouris