These terms are North American railway ("railroad") related.
Slack action is what happens to the cars of a train when it changes speed suddenly. The cars are not rigidly coupled. If the train slows down, each car can try to run into the one in front; if it speeds up, each car will try to pull back. Both these actions place a strain on the couplings between the cars, and, especially with a long heavy train, if not controlled, can cause the train to break apart.
In railroading, slack action is the amount of free movement of one car
before it transmits its motion to an adjoining coupled car. This free
movement results from the fact that in railroad practice cars are
loosely coupled, and the coupling is often combined with a
shock-absorbing device, a "draft gear," which, under stress,
substantially increases the free movement as the train is started or
stopped. Loose coupling is necessary to enable the train to bend
around curves and is an aid in starting heavy trains, since the
application of the locomotive power to the train operates on each car
in the train successively, and the power is thus utilized to start
only one car at a time.
The grade of a section of land, road, railway is its slope, inclination or gradient:
The grade (also called slope, incline, gradient, mainfall, pitch or
rise) of a physical feature, landform or constructed line refers to
the tangent of the angle of that surface to the horizontal.