The developer will go through a stage of milestones. The last three are usually: Alpha, Beta, Gold Master. They are usually determined / signed off, by the publisher. It also involves the platform holder: Sony, Microsoft or Nintendo. If all the Technical Certification Requirements (TCR*'s) are met. Sony/MS/Nintendo will 'pass' the game. Throughout the entire process, it involves the Studios QA, Publishers QA and the platform holder's QA. So the developer will fix bugs. Test it. Submit to the publisher, who then tests again. It's then submitted to the platform holder. Who tests again. If it fails, it's rejected. The cycle starts again.
Once the platform holder has "passed" the product. It will be sent off for distribution. This includes, cover printing, disc production and book printing. It usually takes about a month from Gold Master to distribution. There are companies with insane machines which basically are giant DVD burners.
The 'month' between Goldmaster is an average time. The same as the submission process. Depending on money, desperation to get the product out, the publisher / platform holder can speed up the process. In the case of a title like GTA. There will be an insane QA process going on and Sony and Microsoft will very interested to get the product out.