This is 'Jacob', the oldest standard gauge internal combustion railway locomotive in the world. In the Edwardian era, as well as electric locomotives and trains, petrol engines were beginning to be used on small railway locomotives - they were especially useful on small industrial sites where a steam locomotive could be uneconomical. In the First World War, petrol engined locomotives were widely used on the 2 foot wide narrow gauge railways used to bring men, equipment and supplies up to very close to the front line, the petrol engine being more beneficial than steam as it didn't give off a tell tale plume of steam or smoke.
McEwan and Pratt were one of the biggest early manufacturers of internal combustion locomotives, mainly in narrow gauge. EE Baguley the engineer bought McEwan & Pratt in 1913 and continued to make petrol locomotives, but under the McEwan & Pratt name, as seen on the locomotive dataplate and made 'Jacob', number 680, in 1916, only their second standard gauge petrol locomotive and eleventh petrol locomotive. When new it went to work at an armaments factory in Aintree, and after use there when the war ended, went to work at the Jacob's biscuit factory (hence the name) where it spent most of it's life until retirement
'Jacob' was given to Beamish in 1968, but was on display at the Dinting Railway Centre until 1990. Although work on the petrol engine has been done, it is seen in a dismantled state, and in the photograph of it outside it can be seen in early October being prepared for a move to the Statfold Barn Railway Collection where it will be fully restored (see here for more details http://beamishtransport.blogspot.com/2011/10/news-round-up-mid-october.html).
The image of 'Jacob' in working use came from the Industrial Railway Society website, who have a very interesting page on the locomotive, an article written when the locomotive was retired http://www.irsociety.co.uk/Archives/21/Veteran.htm