The term ruling grade is usually used as a synonym for "steepest climb" between two points on a railroad. More simply, the steepest grade to be climbed dictates how powerful the locomotive must be (or how light the train) in order to complete the run without assistance. Even if 99% of the line could be run with a light (and cheap) locomotive, if at some point on the line there is a steeper gradient that a light engine would be unable to climb, this gradient "rules" that a more powerful (and expensive) locomotive must be used, in spite of it being far too powerful for the rest of the line. This is why special "helper engines" (also dubbed "Bankers") are often stationed near steep grades on otherwise mild tracks, because it is cheaper than running a too-powerful locomotive over the entire track mileage just in order to make the grade, especially when multiple trains run over the line each day.
In the 1953 edition of Railway Engineering William H. Hay says "The ruling grade may be defined as the maximum gradient over which a tonnage train can be hauled with one locomotive....The ruling grade does not necessarily have the maximum gradient on the division. Momentum grades, pusher grades, or those that must regularly be doubled by tonnage trains may be heavier." This means the "ruling grade" may change if the management chooses to operate the railroad differently.
In steam days Southern Pacific trains eastward across Nevada and Utah faced nothing steeper than 0.43% in the 531 miles from Sparks to Ogden—except for a few miles of 1.4% east of Wells. Trains would leave Sparks with enough engine to manage the 0.43% grade (e.g. a 2-10-2 with 5500 tons) and would get helper engines at Wells; the "ruling grade" from Sparks to Ogden could be considered 0.43%. But nowadays the railroad doesn't base helper engines and crews at Wells so trains must leave Sparks with enough power to climb the 1.4%, making that the division's ruling grade.
So the term is always ambiguous, and is more ambiguous still if the ruling grade is a momentum grade. Overland Route trains from Sacramento, California to Oakland face nothing steeper than 0.5% on Track 1, the traditional westward track, but nowadays they might need to climb to the Benicia bridge on Track 2 which includes 0.7 mile at about 1.9%, preceded and followed by near-level track. How to define "ruling grade" there? Should we assume a running start? How much of one? If we don't assume a running start, what train length should we assume, many freight trains being longer than the hill?