No US personnel were hurt in the blast, according to the US State Department, which said a "vehicle-borne improvised explosive device" exploded right outside the entrance to the heavily fortified compound.
Kurdistan is an important partner for the US-led coalition in its campaign to "degrade and destroy" the Islamic State group, which overran large parts of Iraq last summer and threatened to reach Erbil.
A Reuters witness heard the blast, which was followed by gunfire and a column of black smoke high above the Ankawa district, a predominantly Christian neighborhood packed with cafes popular with foreigners.
"It seems the consulate was the target," Nihad Qoja, the mayor of Erbil's city center, told Reuters.
The head of security for Ankawa said three people were killed and 14 wounded.
"They (Islamic State) want to show they are present," Sherzad Farmand said.
Islamic State also claimed responsibility for two car bombings in the Baghdad that killed at least 27 people on April 17.