There are Three gains involved in your diagram (I'm assuming you mean the DC gain).
The gain of the circuit with respect to the V1 input, the gain of the circuit with respect to the V2 input, and the gain of the op-amp itself.
From that diagram, if we assume the gain of the op-amp to be infinite, then we assume the + and - opamp inputs will be the same voltage, and we can calcuate the circuit gains as R/R1 and R/R2.
We cannot calculate the opamp gain from that circuit, there is not enough information, which is why we assume it to be infinite.
If we have more information, like the part number, say TL071, then we can look up in the datasheet, where it says gain is typically 200V/mV, or a minimum of 25V/mV, depending on loading and type.
Obviously having a finite gain means that the inputs will not be at the same voltage, if there's an output voltage. 1v output would typically need a few uV across the input to support it. Given that there could be several mV across the inputs due to input offset voltage, the contribution from finite gain is irrelevant.
Having a finite gain also means the calculated gains will be lower. If the ideal (infinite opamp gain) circuit gain is 10.00000, then the gain with a real opamp would be 9.999....whatever, you figure the exact number of 9s! With 1% resistors, the gain could be anywhere from 9.8 to 10.2, so the error from finite opamp gain is irrelevant.
That's why for most purposes, we assume infinite opamp gain.