A spokeswoman from the office of Viktor Yushchenko, Ukraine's president, said the forces had acted lawfully in entering the premises.
Iryna Vanikova said: "The special services acted strictly on a lawful basis, within the framework of their authority as set down by legislation.
"The actions of the SBU were quite tough as is required in a matter of this sort. The president believes that it is in fact resolve and firmness that are required in investigating abuses.
"The period of laxness and professional apathy in the security forces must end."
But Yulia Tymoshenko, Ukraine's prime minister, said the raid was aimed at paralysing the country's gas system.
Neave Barker, Al Jazeera's correspondent in Moscow, said the search underlines tensions between Yushchenko and Tymoshenko, his rival for political power.
The security service is controlled by Yushchenko, while Naftogaz answers to the premier.
Speaking to Al Jazeera, Natalia Leschenko, a Russia and CIS analyst at Global Insight, an economic information organisation, said that the raid was probably revenge by Yushchenko for Tymoshenko's sacking of his foreign secretary on Tuesday.
"The security forces will probably be looking for information that will implicate the premier"
Russia and CIS analyst,
Leschenko said: "The security forces will probably be looking for information that will implicate the premier... so that the president can turn to the nation and say 'don't trust this woman'.
"It's not the first time that Tymoshenko has faced accusations of wrongdoings. She's very good at brushing them off and the president himself doesn't have much credibility, just like herself.
"So they are both working to undermine the political system at the moment."
Barker said there were fears that the raid could jeopardise a payment deadline, leading to another energy dispute between Ukraine and Russia.
He said the deadline, on Sunday, is for $400m for gas Ukraine received in February.
"There has been concern from both Naftogaz and Gazprom that this raid would somehow jeopardise that payment, purely because Naftogaz indicated that a key document had been seized by security forces," he said.
"That document basically secured the way in which payment between the two countries should take place over gas deals in the coming future."
An official for the Ukrainian gas company said that the agents were seeking copies of a supply contract signed with Gazprom in January.
Serhiy Davydenko, head of Naftogaz's legal department, said: "If we don't have these contracts, then Naftogaz cannot bring the gas through customs or the transit of gas.
"It cannot carry out its obligations under these contracts."
Valentyn Zemlyansky, a spokesman for Naftogaz, said around 15 to 20 security forces had stormed the building, wearing black uniforms and helmets with visors.
He said: "People in camouflage fatigues pushed aside security, showed no documents.
"It is only from news reports that we know that the SBU is conducting some sort of investigation. But how can you call this an investigation when they are carrying weapons?"
Naftogaz and Gazprom signed a contract in January after Tymoshenko and Vladimir Putin, her Russian counterpart, agreed on a deal to end the gas crisis.
Russia has repeatedly accused Ukraine of siphoning off natural gas that was heading through Ukrainian pipelines en route to European customers.