Metrology: How are the most accurate measurements made? How is a most accurate measurement made when there is no other equipment to verify it? Consider you base your apparatus on a set of theory and assumptions, and the result does not match prediction. How can it be determined if the theoretical basis is incorrect of if the fault lies with the measurement equipment?
 A: Say there is a physical parameter $x$. We can measure it with many (ideally different) experiments to get a best estimate of $x$ with uncertainty which I'll denote by $\hat{x}_e \pm \delta x_e$. Likewise, we may have a theory which predicts the value $x$ from other physics parameters $\{y_1, \ldots, y_n\}$ each of which may be defined or measured with some uncertainty. This produces a theoretical estimate of $x$ which I denote by $\hat{x}_t \pm \delta x_t$.
If the $n$-sigma (choose your favorite value for $n$, maybe 1, 2, 3, or 5) error bars for $\hat{x}_e$ and $\hat{x}_t$ are non-overlapping then we say the two estimates are not consistent. Note that the definition could work for multiple experiments or multiple theoretical calculations which may be inconsistent.
If two estimates of $x$ are inconsistent then there are a few possibilities. The most likely possibility (especially if $n$ is large) is that one of the estimates is incorrect. Either the experiment isn't measuring what it think it's measuring or the theory is missing some other unknown effects. There is another possibility which is that the experiments were just extremely unlucky. If an experiment is performed and the result is plotted with a 5-sigma error bar there is still a tiny chance that the "true" value is not covered by that error bar.
In any case, when such inconsistencies are found in science it is typically an opportunity for more work on both the theoretical and experimental side to improve things or find the source of the discrepancy. A real world example of this is the proton radius puzzle. There I believe at least two experiments are inconsistent, and I'm not sure the state of the theory. I haven't read up on this in a while.
edit: To answer your question directly: Other than double checking work, we can't know if the problem is with the experiment or the theory. We can double check the work done on each end. We can perform new experiments or do different theory calculations to get at the same result. Otherwise we have to just improve both experiment and theory until the discrepancy is resolved, possibly discovering new science along the way.
A: You are going to need to narrow down the exact type of measurement made.
As far as I know, gauge blocks are ultimately measured by interferometers and flat surfaces ultimately measured using optical flats.
How the light sources used are calibrated for wavelength and temperature? I don't know. I suspect there is an atomic clock hidden in there somewhere. That simply might be based on the physics of the light sources used (i.e. spectral lines of the gas used).
And temperature measurements are specified by definitions of the phase change temperature of different materials under specific conditions so you don't really need a "master" measurement. That's the reason we are trying to base all units of measurement on the universal constants rather than a physical master like the kilogram platinum-iridium block that used to be used.
And when measuring millionths of an inch, things like the temperature, airflow, lights, and body heat need to be controlled and math done to compensate for the material deformation. As far as I know all mechanical measurements are based on symmetries because you can check symmetries but once you get to this high a level it gets more difficult to spot just how they do it. I always thought it plausible that it's all a self-consistency thing: a big loop of dependencies.

"How can it be determined if the theoretical basis is incorrect of if fault lies with the measurement equipment?

Statistical voodoo may be involved at the highest levels. Terms like "five sigma" certainly seem to come up often when physicists talk about measurements on the bleeding edge. And since it's based on pure math, it is assured to work so long as the proofs supporting it are correct.
