Gov. Muammer Guler said one of the police officers died at the scene of the attack, which happened late-morning -- a time of day when many Turks go to the consulate to apply for visas, Reuters reported.
Bystander Yavuz Erkut Yuksel told CNN-Turk television the attackers emerged from a vehicle and surprised the guard.
"One of them approached a policeman while hiding his gun and shot him in the head," Yuksel said.
Turkish and U.S. officials called the shooting a terrorist attack.
"It is enough to say they are terrorists who carried out a dastardly and cowardly attack," U.S. Ambassador Ross Wilson told a news conference in Ankara, according to Reuters.
"Our countries stand together in the fight against international terrorism. This was an attack on a diplomatic establishment here," Wilson said.
At least two of the attackers were Turkish nationals, Guler told the Associated Press. Police said they were pursuing a fourth attacker who escaped in a car. State Department spokesman Tom Casey said no Americans were injured in the attack.
One of the dead Turkish police officers was working at the consulate, and the two others were traffic officers, Reuters reported.
"I was greatly saddened by the martyrdom of our three police officers in a terrorist attack," Prime Minister Tayyip Erdogan said in a statement.
The U.S. ambassador to Turkey and Turkey's foreign ministry said security around all U.S. diplomatic missions in Turkey had been increased.
The U.S. consulate building was built after Islamic militants linked to al-Qaida carried out suicide bombings in 2003 that targeted two synagogues, the British Consulate and a British bank in Istanbul. Those attacks killed 58 people.
The attack coincides with lingering political tensions in Turkey over how Islamist traditions and secularism merge in the Turkish government and the role of military, which considers itself the guardian of the secularist traditions of modern Turkey's founder, Kemal Ataturk.
Turkey has also seen armed attacks from a variety of groups over the years, including Maoists, Trotskyists, Kurdish separatists and Islamist militants, Reuters reported.
"I curse strongly these kinds of terror attacks. Turkey will struggle to the end with those who organize these (attacks) and the mentality behind them," President Abdullah Gul said.