The GD library is already included in the PHP package, even in PHP4.0.4pl1 (the ZIP file, not the installer!).
If you have PHP working on the IIS as a ISAPI module you just need to edit the php.ini file (residing in C:\WINNT) and remove the ";" in front of extension=php_gd.dll. That should be it.
A detailed description about IIS installation can be found in the install.txt. The installation of the GD library has been discussed already more then necessary in this forum, so just go and search for GD...