I believe its generally accepted that the current gauge was based on early horse drawn railways, which were given that gauge based on the average width of a horse.
In other words, railway gauge is literally the size of a horse's arse!
I am willing to entirely refute this view. The whole 'horse's rear' myth has been around for, err, donkeys' years but has no real basis in fact.
Serious historical research will draw out two entirely separate threads:
1. In the North East of England in particular, coal was measured by volume - in 'chauldrons' - rather than weight. Obviously there weren't sophisticated weigh-bridges hundreds of years ago. The chauldron load was the basis for tolls, taxes, duties, shipping and so on. Very simply, one waggon held one chauldron, could be pulled empty uphill by one horse and be operated by one man. Most waggonways operated on a 'gravitate down/horse drawn up' basis. Clearly a vehicle to convey a chauldron could vary in width, length or height whilst still achieving the required capacity but things evidently settled down with the optimum wagon width between the wheels that implied a track gauge of around 4' 8". This was by no means exact. The Wylam Waggonway, which ran past George Stephenson's childhood cottage actually had a gauge of 5' 0.25". A horse could comfortably fit between the lowered shafts of an empty waggon.
2. The first cast iron plateways/waggonways/tramroads/etc. on any scale were developed by the Outram family in Derbyshire (who also had an iron-founding business). The first line was the Butterley Gangroad, to connect the Outrams' works to the Cromford Canal and supply limestone quarried near Crich. Thus it was an 'internal' transport proposition and not for moving coal either. The gauge was 3' 6" (42 inches seeming to be the answer to life, the universe and waggonways) and horses were used to haul short 'gangs' of waggons quite effectively. The Little Eaton Gangway followed, ushering in the age of tri-modal containers rather than bulk open waggons, still 3' 6". It was the Peak Forest Tramway that was the first really 'big' railway, carrying limestone in gangs of up to 40 waggons gravitating together with a crew of only two people. The empties were horse drawn back up in gangs of five. For an altogether bigger transport prospect the gauge was increased to 4' 2".
Many Outram lines were built in South Wales, eventually creating almost a network of over 350 miles that stretched as far as Hereford, nearly all on a gauge of 4' 2" and virtually all using horse haulage. The Trevithick Pen-y-Darren locomotive trial in 1804 was on one of these lines.
4' 8.5" =/= Width of a horse's posterior!