How was Walter able to make better/higher purity meth than Gale?

Walter didn't have a dedicated lab and he was making better product than Gale? Am I remembering that correctly?

Also, from what I remember Gale basically lived and breathed chemistry while Walter spent decades teaching high school chemistry while not really "practicing" chemistry in the same way Gale was. How was Walt able to just jump back in and beat Gale so quickly and easily?