Petropars Operation and Management and Petropars Resources Engineering had argued there was insufficient evidence to include them.
The companies are part of a group involved in extracting natural gas from Iran's South Pars field.
They appealed to the EU court in May.
A note from the UK Treasury said an asset freeze no longer applied to the companies.
The EU court removed the companies from the list after receiving no objection from the European Council.
At the same time the court maintained sanctions on two other companies, Petropars Iran and Petropars Oilfields Services, because of the larger stakes they had in parent group National Iranian Oil Company.
While the decision to remove the two companies was not related to the recent nuclear agreement, Pavani Reddy, managing partner of law firm Zaiwalla and Co Solicitors, said she hoped the warming relations between Iran and the west would ensure her clients stayed off the list of sanctioned companies.
The European Union has removed two Iranian oil companies from its sanctions list, the first such action since Iran reached a nuclear agreement with world powers earlier this month.