The first train to Jerusalem was inaugurated in 1892 during the Ottoman rule of Palestine. The steep climb from Jaffa through the mountains to Jerusalem was slow and dangerous. The sharp curves meant frequent derailments.
These pictures come from the Library of Congress' American Colony collection.
The rail system in the Holy Land was also a hodgepodge of different rail widths. The original rail to Jerusalem was 1 meter wide. Some rail lines from Cairo were standard gauge (1.435 meter); others were part of the Hejaz railroad (1.050 meter). And during Britain's campaign in Palestine against the Turks they introduced temporary narrow gauge (600 mm) rail lines from Jaffa and between Jerusalem and Ramallah.
The narrow gauge line in Jaffa was built on a wider road bed. Jews were expelled from Jaffa by the Turks in World War I and rails were removed for use in the Turkish war effort. This picture, therefore, is almost certainly taken soon after the war.
As the British pushed the Turks out of Palestine they rebuilt the rail lines destroyed by the Turks. In the case of the "temporary" Jerusalem-Ramallah line, they used narrow gauge rails. By 1920 they had rebuilt the Jaffa-Jerusalem line with standard gauge.
The re-dedication of the line was celebrated by the British High Commissioner Sir Herbert Samuel who apparently drove the locomotive between Jaffa and Lod.
Sent by Israel - A picture a day.