The basic problem is that you misunderstand "gain". You are looking at voltage amplification only, not power amplification. This circuit has a voltage gain just below 1, but does have significant power gain.
Each top and bottom half is just a emitter follower. At first approximation, the B-E drop is fixed, but the emitter current is β+1 times the base current. If these transistors have a gain of 50, for example, then for every mA you put into the base, you get 51 mA into the load. Overall, the voltage gain is about 1 and the current gain is about the gain of the transistors, so the power gain is also about the gain of the transistors.
Another way to look at this power gain is as a impedance converter. The input and output signals are about the same in voltage, but the impedance of the output signal is reduced by the gain of the transistors. For example, if the load is a 8 Ω speaker and the transistors have a gain of 50, then the input of this amplifier has a impedance of about 400 Ω. That is a lot easier for the previous stage to drive than a 8 Ω load. No matter how you look at it, in this example the gain is about 10*Log10(50) = 17 dB.