An embassy spokesman, Andrew Greenstock, said two shots were fired at the main gate of the north Tehran compound at 6.10pm (1340 GMT) on Sunday, adding that nobody was injured in the shooting.
He said witnesses questioned after the shooting had seen two men on a motorbike fire the shots. The walled compound hit was one of the embassy's main residential facilities where a large proportion of embassy staff are housed.
The main embassy in the centre of the city was targeted and hit by gunmen on 3 September, and Britain's Foreign Office authorised the voluntary departure of non-essential members of staff and dependants.
The embassy has since been carrying out "limited functions".
The attacks come amid a severe souring of relations between London and Tehran.
In the second incident on 9 September, three to four shots were fired outside the British embassy, sparking an angry diplomatic protest from the embassy that Iranian authorities were failing to provide adequate security.
The attacks come amid a severe souring of relations between London and Tehran over the arrest in Britain last month of a former Iranian ambassador to Argentina, Hadi Soleimanpur.
Soleimanpur was arrested in northeast England on an extradition request from Buenos Aires, which accuses him of taking part in a 1994 bombing of a Jewish centre in Argentina that killed 85 people.
On Friday he was freed on bail, but anger among Iranian government circles has mounted further, following a resolution passed by the International Atomic Energy Agency (IAEA) that gives the Islamic republic until the end of next month to prove it is not developing nuclear weapons.