Gunshots were heard at about 09:30 local time (04:30 GMT) outside the consulate in the upmarket Clifton area, police said.
Up to four gunmen tried to enter the consulate but were stopped by security guards at a checkpoint, reports said.
Three attackers have been killed by police in an exchange of gunfire.