Shipments of anhydrous ammonia and other farm products could be disrupted unless Congress ex­­tends a deadline for making railroad safety improvements.

Railroad companies say they won’t be able to meet the Dec. 31 deadline for installing positive train control (PTC) systems, which remotely track and control trains to prevent collisions. The systems will be required on routes that transport passengers or hazardous materials.

A massive effort is underway to...