In the early 1830s, the state of Pennsylvania constructed a series of canals for transporting freight across the state. For the segment over the steepest portion of the Allegheny Mountains, a series of inclined railroads were constructed, between Hollidaysburg and Johnstown. The incline rail segment opened in 1834, and was closed 20 years later when the Pennsylvania Railroad opened its main line over Horseshoe Curve.
Parts of the historic railroad have been reconstructed, and are maintained by the National Park Service as the Allegheny Portage Railroad National Historic Site. (See the link below.)
Thanks to Mike Palmer for contributing information about this route.