According to the Help Author's Guide (hcw.hlp):
"A configuration (.gid) file is a hidden file that WinHelp creates when a Help file is first opened, or when a Help file is updated. A .gid file contains information about the Help file, including:
Binary representation of the contents (.CNT) file, including jumps and commands, after it has been processed. Only topics that were found during processing are stored.
The filenames and titles of all Help files included in the contents file.
Keywords from other Help files (if :Index statements were used in the contents file).
List of which files have full-text search index (.FTS) files.
The size and location of Help windows and dialog boxes."
The process of searching for and creating .gid files occurs when you see the "Setting Up Help" message. A .gid file has the same name as its corresponding Help file (but with a .gid extension) and is stored as a hidden file in the same folder as the corresponding Help file. If the Help file is in a folder to which you do not have write privileges (such as on a CD-ROM or network drive), the .gid file is created in the Windows\Help folder.
Windows stores pointers to all the topics and entry points in a Help file in the corresponding .gid file for the following reasons:
This information is not stored in the Help file itself in order to minimize the size of the Help file.
Windows uses .gid files as status files (for example, the Help window position is stored in this file).
Help files on a network or CD-ROM