I'm a long time fan of short lines and logging roads, where they do things the bigger roads would never allow.
The steepest grade I ever heard of, used on a friction (normal) railroad, was 15%. and the only loco that could barely make that grade, was a Shay geared locomotive. A 2-trucker to be more specific, as there were switchbacks that limited maximum train length to just a couple cars at a time. Worse still, the grade could not be climbed in a pouring rain, as a lot of sand had to be thrown on the tracks, often by hand, and rain washed it off or made it too slick.
If memory serves, which I wouldn't bet the farm on, the railroad was in New Zealand or Australia. There is a term for the type of RR, that was somewhat common there, but I cant remember the term. Something about getting goods up and across steep terrain bordering the seacoast, where the coast and inland had more normal grades, but they had to get creative to get between one and the other.
In any case, that stretch was only in use for a short time, until a tunnel or bypass route was put in to get past that steep section.
Cog, or rack, railroads operate in a different way. They have some sort of rack or ladder as part of the track, and some sort of gearing on the locos that meshes with it. It works as a ratchet, to keep the train from sliding down the track, so they can have very steep grades. Grades far beyond anything any friction road could ever have. But such RRs can also be used for pulling heavy loads as well. The Panama Canal has, or did have, such a RR line, to pull ships thru the locks.