Under the microscope, G cells can be identified by their location in the gastric glands and their characteristic granular appearance. They contain numerous secretory granules, which are visible in histological sections stained with special techniques like immunohistochemistry. The granules contain gastrin, which can be visualized using specific antibodies.