Residents said they first heard firing and explosions around 9.30 AM (local time). All three gunmen were killed, the Karachi police chief said.
Two policemen were killed in the attack which was claimed by the separatist Balochistan Liberation Army insurgent group. Orakzai has been the scene of several militant attacks in recent years, mostly by Pakistani Sunni militants, who revile Shiites as apostates.
He said they threw a grenade and then opened fire.
Reacting over the attack at the Chinese Consulate, the Foreign Minister Shah Mehmood Qureshi, while talking to the journalists outside the Parliament house, strongly condemned the attack over Chinese consulate and termed it as a "cowardly" act by the "evil forces".
"Three attackers have been killed in the exchange of fire with our forces".
Nine hand grenades, Kalashnikov bullets, magazines and explosives were recovered from the possession of the terrorists, police said.
He said the incident is part of conspiracy against Pak and China economic and strategic cooperation.
In August, a BLA suicide bomber attacked a bus carrying Chinese mining workers in Baluchistan, wounding five people.
Trump hands over responses to Robert Mueller's team
It is unclear whether Mueller would subpoena him to testify, likely setting off a legal and political battle. Trump joins a list of recent presidents to be questioned as part of a criminal investigation.
Addressing at the floor of the National Assembly, Shehbaz Sharif denounced the attack and demanded of the government to brief the House on the attack.
China has called Pakistan a showcase for its global development campaign, the Belt and Road Initiative.
Chinese consulate in Karachi attacked: Armed men attacked the Chinese consulate in Pakistan's Karachi this morning.
It is a multi-billion dollar series of Chinese investments in Pakistan's infrastructure and energy projects.
"China is exploiting our resources", a spokesman for the so-called Balochistan Liberation Army said in a telephone call to Reuters news agency.
Meanwhile, at least 35 people were killed and more than 50 wounded when a bomb hidden in a carton of vegetables ripped through a crowded marketplace in Pakistan's northwest.
Pakistan has long accused its old rival, India, of supporting nationalist insurgents in Balochistan, while India accused Pakistan of nurturing Islamist militants throughout the region.
India's foreign ministry swiftly condemned today's attack in a statement, saying: "There can be no justification whatsoever for any act of terrorism". The two countries have strengthened ties in recent years and China is now building a network of roads and power plants under a project known as the China-Pakistan Economic Corridor, or CPEC.