The party began on New Year's Eve in the village of Llinas del Valles some 30 kilometres (19 miles) northeast of Barcelona, with revellers gathering without any regard for safety restrictions aimed at stopping the spread of the virus.
In a posting on Twitter, the Catalan regional police said they had confiscated the sound system and all the other equipment used at the party and would press charges against all who were involved.
“We will prosecute the organisers and all the partygoers,” police said, indicating the penalty for attending such an event started at 3,000 euros ($3,650).
“The three organisers of the illegal party in Llinars have been arrested. They will go to court in the next few hours,” police said, indicating they could face a penalty of up to 600,000 euros.
At the scene, a police helicopter flew overhead as hundreds of police entered the warehouse as a large crowd of onlookers gathered nearby, Spain's RNE public radio reported.
Footage obtained by AFP from inside the warehouse shortly before the raid showed a large group of people dancing in front of a huge skull wearing a Santa hat, all of them in close proximity with no masks, and often smoking.
When the police arrived, most of them in riot gear, brief scuffles broke out on the dance floor where a young topless woman could be seen trying to calm the situation.
At least nine police vans could be seen parked inside the building.
It was not immediately clear how many people had been arrested, nor were the police immediately available to comment on media reports that many of the revellers had come from abroad.
Asked why the operation only began around midday on Saturday, police officials told local media it was a complex operation and they didn't move in until they were able to ensure the safety of officers and partygoers.