Archaeologists ad volunteers with the 1772 Waggonway Project made the finds while searching for the relic of the salt and coal industries of the 17th and 18th centuries.
The tracks were discovered on the line of the Tranent Waggonway, Scotland’s earliest railway that moved coal from pits at Tranent to salt pans
The team found not one, but three wooden railways lying stacked on top of each other at Cockenzie and Port Seton.
The tracks were replaced and upgraded, one after the other, in different sizes as new leaseholders, who included revered architect William Adam, came in.
No other site of its kind is known to exist, with the find, made around halfway between Cockenzie and Meadowmill, judged to be of national importance.
Anthony Leslie Dawson, an early railway historian, said: "It was an absolute privilege to take part in the waggonway excavation both as an archaeologist and an early railway historian. After all it's not every day that you see railway history being rewritten before your eyes.
"The site is of national significance. A three-phase wooden waggonway, stacked on top of the other, is without precedent.
"Whilst we know these railways had a limited life-span due to their method of construction, to see this process of continual replacement and upgrade, including a change of gauge, in the archaeological record is outstanding.”
Mr Dawson said part of the railway had been “floated” over soft ground using a raft formed of “timber cordurouy”, with the technique used by the Romans and George Stephenson in the building of the Liverpool & Manchester Railway in 1830.
The waggonway was built by William Dickson in 1722 for the York Buildings Company, following their acquisition of the Winton Estates in 1719.
Examination of the three tracks found the gauge was changed over time, from an initial 3ft 3 inches in the first phase to 4ft 0 inches in the second and third phases. Today’s railways are 4ft 8½ inches.
This is the only site of its kind in railway archaeology, it has been claimed.
Further research by the waggonway project found each phase of construction came shortly after a change in “tack” or lease of the tracks.
In 1728, the lease was taken on by architect William Adam, the renowned Scottish architect and entrepreneur, and the construction of phase two started less than a year later. Phase three was overseen by William Grant, another local merchant.
Adam’s waggonway was described as “extremely well constructed”, with cobbles forming the horse track between the rails.
A significant quantity of industrial waste material from the Port Seton Glassworks, in which Adam had a stake, was also discovered.
A salt pan building in Cockenzie, originally constructed in 1630 by the Earl of Winton, was also discovered by the team.
The site surpassed all expectations, with not one, but two phases of salt making being revealed. The salt pan, which was fired up from 1630 through to the last phase of use around 1780, is completely unique in Scotland.
Stone walls which supported a 18ft-wide iron brine-boiling pan were discovered in the centre of the building.