The two were reportedly an adult and a child, taking part in a school outing to see baby lambs, the public broadcaster NOS said.
"Two fatally wounded in rail accident at #Harlingen," police said on Twitter, adding no other passengers had been found in the car.
The exact circumstances remained unclear, with the police saying "an inquiry is ongoing."
But the NOS reported that the car was the first to leave the farm after a visit by 23 primary school children.
Also Read
The crossing is marked by a barrier, a crossing-sign as well as signals, but is not alarmed, ProRail added.
Services between Drondrijp, close to Leeuwarden, and the North Sea port of Harlingen Haven have been suspended, the Arriva rail company said on Twitter, adding buses had been laid on to ferry passengers.
In November, 18 people were injured in the rural area of Winsum, about 100 kilometres east of Harlingen, when a tanker transporting milk collided with a train, causing the carriages to derail.
Disclaimer: No Business Standard Journalist was involved in creation of this content