Militants reportedly attacked soldiers who had assembled in preparation for an attack in Bala Buluk district.
The attack triggered a deadly skirmish between fighters from the hardline Islamic movement and security forces.
Afghanistan has seen a surge in attacks in recent months, with militants often targeting state security forces.
Much of Afghanistan's opium harvest comes from Farah province, which borders Iran.
The attack in Bala Buluk district comes two weeks after a similar assault by the Taliban on an army base in the same province.
At least 22 members of the security forces died in the attack.
Four members of the special forces had been killed and several wounded in the latest assault, a spokesman for the defence ministry, Dawlat Waziri, told Reuters news agency.
The head of the local provincial council, Farid Bakhtawar, said that an air strike by Afghan security forces killed around 25 insurgents after the initial skirmish.
A Taliban spokesman claimed on social media that 53 soldiers had been killed or wounded in the militant group's attack.
A recent BBC study found that the Taliban now control or threaten much more territory than when foreign combat troops left in 2014.
More about: Afghanistan