Many unconventional superconductors exhibit a common set of anomalous charge transport properties that characterize them as `strange metals, which provides hope that there is single theory that describes them. However, model-independent connections between the strange metal and superconductivity have remained elusive. In this letter, we show that the Hall effect of the unconventional superconductor BaFe$_2$(As$_{1-x}$P$_x$)$_2$ contains an anomalous contribution arising from the correlations within the strange metal. This term has a distinctive dependence on magnetic field, which allows us to track its behavior across the doping-temperature phase diagram, even under the superconducting dome. These measurements demonstrate that the strange metal Hall component emanates from a quantum critical point and, in the zero temperature limit, decays in proportion to the superconducting critical temperature. This creates a clear and novel connection between quantum criticality and superconductivity, and suggests that similar connections exist in other strange metal superconductors.