The allies can (and usually will) still win the game if being 30-40 IPCs behind, IF they can correct this pretty soon. Let’s say in ~5 turns max., they must at least get a total equalization of both economies.
Having said that, if there is no visible possibility to (at least) equalize, the allies will have lost the game even if their shortfall is only small. I have no exact figures here but I bet the allies will have lost the game even if their shortfall is 5 IPCs per turn only, if they have no possibility to repair this.
Sometimes every IPC (per turn) counts…