Those are all relevant to the potential power output of a steam locomotive, but they don't determine it. Really fine details (e.g. the configuration and diameter of the internal steam pipes leading from the steam dome to the cylinders) can have a massive effect on the actual output of an engine, and I think even at the end of the stan era designers couldn't safely compute the power of a locomotive from the blueprints.
New locomotives would be tested. Simple, direct, test of power would be a series of test runs (at different speeds) with a dynamometer car: a test car, positioned between the locomotive's tender and the train being pulled, with an instrumented draft gear so the pulling force could be continuously recorded: force times speed = power. (Running at a constant speed on straight and level track is ideal for measurement. In practice, life is complicated.) Another method (careful railroads would use both) involves pressure sensors temporarily installed in the cylinders: recording the pressure through the full cycle lets you calculate the force going to the driving wheels, and the details of the "shape" of the pressure function (literally a shape, when instruments that drew a graph were used) gives insight into how efficiently steam is being used. There are photos of steam locomotives being tested in this manner: a temporary shelter is built on the locomotive's pilot so technicians can take care of the pressure sensors while the test run is being made.
Often a new locomotive would be modified after testing.
As for the locomotive measurements you suggest…
--Weight on drivers doesn't directly affect power (imagine two locomotives with exactly the same SHAPE of every detail of boiler and piping, but with boilers made from different alloys: they might have the same power, but differ in weight), but effects how much of the power can be used: too light in proportion to power and the driving wheels will slip and spin uselessly when you try to run at full power.
--Steam pressure is, of course, a key thing, since it is steam pressure on the pistons that makes the wheels go round! But stan pressure in the boiler (what the safety valves are set at) isn't the whole story, since pressure can be lost in the piping to the cylinders, and details of the exhaust arrangements can change the pressure of the exhaust steam (the useful, piston pushing, pressure being the difference between the pressure at which steam goes into the cylinders and the pressure at which it comes out). A reasonable rule of thumb for estimating the power of a typical 20th C American steam locomotive is to assume the cylinder pressure is 85% of the boiler pressure.
--Grate area is one of the determinants of how much fuel can be burned in a given time. Too little and the engine will "run out of steam": the first few revolutions of the driving wheels will be at the full power permitted by the boiler pressure, but if not enough heat is going into the boiler, the steam being used won't be replaced, and soon you will be trying to operate at a much smaller pressure. (The Erie and Virginian "Triplex" locomotives were unsuccessful because of this: their boilers could hold stan at a pressure that allowed them to operate at a good power, but they had too many cylinders for their grate areas: steam would get used faster than it was produced.)