The U.S. standard railroad gauge (distance between the rails) is 4 feet, 8.5 inches. That's an exceedingly odd number. Why was that gauge used? Because that is the way they built them in England, and the U.S. railroads were built by English expatriates. Why did the English people build them like that? Because the first rail lines were built by the same people who built the pre-railroad tramways, and that's the gauge they used. Why did they use that gauge then?
Because the people who built the tramways used the same jigs and tools that they used for building wagons, which used that wheel spacing. Okay! Why did the wagons use that odd wheel spacing? Well, if they tried to use any other spacing, the wagons would break on some of the old long-distance roads because that is the spacing of the old wheel ruts.
So, who built those old-rutted roads? The first long-distance roads in Europe were built by Imperial Rome for the benefit of their legions. The roads have been used ever since. And the ruts? The initial ruts, which everyone else had to match for fear of destroying their wagons, were first made by Roman war chariots. Since the chariots were made for or by Imperial Rome, they were all alike in the matter of wheel spacing. So, why did the Romans pick that spacing? Because the Imperial Roman chariots were made to be just wide enough to accommodate the backends of two horses.
PS I wrote this up (cleaning up an internet forward) about 12 years ago. It's still floating around on a number of websites.
Further research suggests that it may not be true at all.