The UK has retained the effects of EC Council Regulation No 2271/96, known as the EU Blocking Statute. The UK Blocking Statute prohibits UK residents and companies from complying with certain extra-territorial US legislation, specifically in relation to Cuba and Iran, unless they are exceptionally authorized to do so by the Secretary of State for International Trade. The UK Blocking Statute also allows UK residents and companies to recover damages arising from such legislation from person or entities causing them, and prevents any foreign court rulings based on the blocked legislation from having effect in the UK.
For more on the US secondary sanctions against Iran, see here.