The Aberlady, Gullane and North Berwick Railway was promoted independently to develop settlements between Longniddry and North Berwick in East Lothian, Scotland. It opened its line from a junction near Longniddry as far as Gullane in 1898, but never succeeded in financial terms, and it never competed its line to North Berwick, which already had a branch railway.
It closed to passengers in 1932 and continued, partly due to sugar beet traffic, until closing completely in 1964.
In 1850 the North British Railway opened a branch line from Drem station, on its main line to Berwick, to North Berwick. The North British hoped that it would develop the town as a superior residential area, for people with daily business in Edinburgh. That trade was slower to build up than the NBR intended, but the focus on golf as a pastime, and on the increase of visits to resort locations, led to the eventual establishment of the branch as a useful asset to the company.
Settlements to the west relied on road connection to the main line for travel to Edinburgh for many years, but in 1892 a scheme was promoted for a new railway branch from Longniddry, on the main line railway, to North Berwick, running through Aberlady, Luffness and Gullane. The proposed line was independently supported, although the North British Railway were favourably disposed in the background. However, when the Bill for the Aberlady, Gullane and North Berwick Railway was presented, the North British Railway objected, as did a local landowner, Walter Hope, who saw that his farm and house would be prejudicially affected by the proximity of the course of the line. The NBR now saw that the line running through to North Berwick would abstract business from their own line.
Negotiations followed and the proposed route of the line was modified to satisfy Hope, and discussion with the North British Railway resulted in their agreeing to work the line for 50% of receipts, guaranteeing a 4.5% dividend on the Company's capital of £66,000. The Aberlady, Gullane and North Berwick Railway received the Royal Assent on 24 August 1893; the Act specified that the line could not be extended through from Gullane to North Berwick without the consent of the NBR.
The practical benefit of the line was simply to connect some minor villages to the railway, and when subscriptions for shares were sought, it proved very difficult to generate financial commitment. Indeed, four years after the passage of the Act, the Company was still unable to pay the expenses to witnesses at the Parliamentary hearings. Preference shares were issued and finally by September 1898 sufficient capital had been acquired to finish the line. A contract for construction had been let in 1896.
The construction was completed, between Spittal (where the junction was named Aberlady Junction, a mile and a half east of Longniddry) and Gullane, and the line opened on 1 April 1898. The signalling on the single line branch was by the Tyers electric tablet system. The train service was lavish, at nine passenger trains each way daily, with additional trains on summer Saturdays.