To enable windowed mode, first change the color depth to 16bit.
On Windows XP, right-click your desktop, select Properties -> Display, select the 16-bit color mode and confirm by clicking OK.
On Windows Vista and 7, right-click your desktop, select Screen resolution, select the 16-bit color mode and confirm by clicking OK.
On Windows 8, right-click the game's shortcut, select Properties -> Compatibility -> Reduced color mode -> 16-bit. Confirm by clicking OK.
Now, download this file, and replace the "Pharaoh.inf" and "Pharaohmap.inf" files found in the game's directory (default: C:\GOG Games\Pharaoh Gold\) with the ones found in the ZIP file. You can maximize the window afterwards.