Inverting opamp amplifier
It seems you are confusing the open loop gain of the OpAmp (which is just the component) with the gain of the whole circuit.
What if you consider the OpAmp as ideal except for the infinite open loop gain:
$$\frac{V_{neg}-V_{in}}{R_i}=\frac{V_{out}-V_{neg}}{Rf}$$
$$(V_{pos} = 0) \rightarrow V_{out} = -KV_{neg}$$
Replace Vneg in the first equation.
$$R_f * \frac{-V_{out}}{K} - Rf V_{in} = R_i V_{out} + \frac{R_i V_{out}}{K} $$
And isolate real gain:
$$\frac{V_{out}}{V_{in}} = \frac{-Rf K}{RiK + Ri + Rf}$$
As the open loop gain K tends to infinity, the real gain tends to the ideal formula.
$$\frac{V_{out}}{V_{in}} = \frac{-Rf}{Ri}$$
Op-amp calculations are a little weird, because they start with the assumption that the op amp output is not saturated. This is not automatically true, but in later steps we'll ensure that that is the case.
For the op-amp to not be pinned at either rail (unsaturated), the inputs to V+ and V- need to be essentially equal. This is why op-amp equations include the assumption V+ = V-.
Now lets look at the inverting amplifier through this lens. We assume v+ will be equal to v-, and v+ will be set at 0V, therefore v- must be maintained at 0v.
How will this happen? Well I like to think of it like this: If we start with the assumption that v- is 0 volts, then a certain current will flow across the input resistor to v-. If vin is 1v and the resistor is 1k, then 1mA will flow. As this happens the voltage at v- will start to rise, and the op amp output will start moving towards the negative rail (slewing). The op-amp will keep slewing until the current leaving the feedback resistor exactly equals the current in to v-. At that point the voltage at v- will be a steady 0 again and the output will be stable. The amount of output voltage swing required to create this current depends on the feedback resistor. If Rf is also 1k, then 1V will be required, creating a gain of -1. If Rf was instead 2k, then 2v would be required to remove that 1mA, and the gain would be -2.