The protests led the airport authority to cancel all flights on Monday and suspend all check-in processes on Tuesday, leaving hundreds of travellers stranded and frustrated.
After days of disruptions, the Airport Authority said on Wednesday that it had obtained a temporary injunction banning protesters from entering certain areas.
It said in a statement on its website that people would be "restrained from attending or participating in any demonstration or protest... in the airport other than in the area designated by the Airport Authority".
With the injunction, the protesters are now confined to a designated area within the airport to stage protests. The scope of the legal action, however, is not yet clear.
Meanwhile, the airport began returning to normality on Wednesday with the number of cancelled flights down to 60, according to the airport's website.
As a result of the injunction, the number of demonstrators at the terminal had also dropped to a meagre 50 from thousands on the previous two days. The few dozens of protesters remaining on the premises had stayed there overnight following the tumult on the previous night that led to the arrest of five men, Efe news reported.
The supposedly peaceful sit-in held on Tuesday gradually degenerated into vehement altercations after black-clad demonstrators started to occupy the departure area of Terminal 2, prompting the authority to suspend check-in for all flights.
Brawls broke out sporadically between some demonstrators and disgruntled travellers, who were angry that the former had blocked their paths with luggage trolleys.
At night, chaos erupted when some protesters besieged a man they suspected to be an undercover agent from China. His hands were later tied up by protesters who surrounded him for about three hours.
Shortly before 11 pm, the police arrived at the scene. At one point, a police officer took out his revolver and pointed the service weapon at a hostile crowd after he was surrounded and assaulted by a group of young men attempting to save a protester pinned to the ground by the officer.
After the police used pepper spray to disperse protesters and after the alleged undercover agent was taken away by an ambulance, another mainland Chinese man was surrounded by protesters and zip-tied to a luggage cart.
The man was later identified as Fu Guohao, a reporter working for China's state-run newspaper Global Times, which has been publishing editorials highly critical of the ongoing anti-government movement in Hong Kong.
Hong Kong is witnessing the 11th consecutive week of demonstrations that erupted in June, sparked by the government's controversial extradition bill that was later shelved by Hong Kong Chief Executive Carrie Lam after intense pressure.
The controversy surrounding the now-defunct extradition bill, which would have enabled fugitives to be transferred from Hong Kong to mainland China to stand trial under the latter's opaque legal system, has morphed into a set of wider demands for democracy in the ex-British colony.