Steep grade railway

A steep grade railway is a railway that ascends and descends a slope that has a steep grade. Such railways can use a number of different technologies to overcome the steepness of the grade.
Usage.
Many steep grade railways are located in mountain regions, and are hence also mountain railways. Such railways may form part of infrastructure provided for use by tourists, or as provision for winter sports.
Other steep grade railways are located in hilly urban areas. Again these may be largely tourist oriented, or may be used as part of the local public transport provision.
Technology.
On steep grades the friction between the wheels and the rails cannot apply sufficient adhesion to the train's wheels so as to overcome gravity, and the train is in danger of sliding down the track. In practice this affects downhill braking capability before it affects uphill climbing ability, and some mountain railways at the lower end of the steepness spectrum rely on standard adhesion for propulsion, but use special track brakes acting directly on the rails.
Where the line is too steep to rely on adhesion for climbing, a rack railway may be used, in which a toothed cog wheel engages with a toothed rack rail laid between the tracks. A now little used alternative to the rack and pinion railway is the Fell system, in which traction and/or braking wheel are applied to a central rail under pressure. 
Another alternative is a cable car in which the car runs on rails, but grasps a continuously moving cable underneath the rails for propulsion, releasing the cable to stop. This is used in San Francisco's famous cable cars.
Finally at the steepest end of the spectrum, a funicular railway may be used. Here a cable is used to haul counterbalanced trains up and down the track. The cars are permanently attached to the cable, which stops, starts and reverses as required. Cars are often custom built for the slope, with specially raked seating and steps rather than a sloped floor.
Taken to its logical conclusion as the slope becomes vertical, a funicular becomes an elevator.