A universal inequality for CFT and quantum gravity