The UK runs a governmental website which contains plenty of information on the topic. It is complete and interactive. What you can do is use the dedicated tool to check whether or not you need a visa. In your case:
You’ll need a visa to come to the UK
The visa you need depends on your partner or family member’s situation.
They’re a British ...
You need a transit visa as Iran is not in this list of nationalities able to transit without a visa.
Having completed the form on the Australian visa website, you do need a visa:
As shown in the image, this is free, allows you to stay for up to 72 hours and usually processed within 19 days. You can read more details and apply here.