Catalyzes the NAD-dependent oxidation of glucose 6-phosphate to 6-phosphogluconolactone. D-glucose 6-phosphate + NAD(+) = 6-phospho-D-glucono-1,5-lactone + H(+) + NADH The catalytic efficiency with NAD(+) is about 230-fold higher than with NADP(+), indicating that NAD(+) is the physiological electron acceptor. Optimum pH is 8.5. Carbohydrate degradation; pentose phosphate pathway. Homodimer. Deletion mutants do not grow on glucose. Belongs to the NAD(P)-dependent epimerase/dehydratase family.