Various videos from the attack earlier on Wednesday show at least two people firing guns around the entrance of Turkish Aerospace Industries (TAI), which is located some 40km (25 miles) outside the capital.
Turkish Vice President Cevdet Yilmaz said four of the victims were TAI employees while the fifth was a taxi driver.
Local media had earlier reported that the attackers killed the cab driver before taking his vehicle to carry out the attack.
The blast took place around the time of a shift change, and staff had to be directed to shelters, they said.
Yerlikaya also confirmed that seven special ops forces members were among the 22 who were injured in the attack.
The PKK is banned as a terrorist organisation in Turkey, the US and UK, and has been fighting against the Turkish state since the 1980s for greater rights for the country’s significant Kurdish minority.
Turkish President Recep Tayyip Erdogan – who is in Russia for the Brics summit – condemned what he called a “vile terror attack” during a meeting with Russian President Vladimir Putin, in remarks broadcast live on TV.
He later posted a lengthy statement on X, saying that security forces acted quickly to neutralise the threat, and that “no terrorist organisation, no evil focus targeting our security will be able to achieve their goals”.