GIMP requires X11 to run on mac. There are two ways to install X11 on OS X 10.5.2. The first one is to use the packages provided by Apple. The second is to install the packages provided by the XQuartz project. Installing from XQuartz is usually easier, and they are more up to date, however they are not official packages and some people reported problems when using XQuartz. We recommend you try XQuartz first since it's easier to install, and on failure (if GIMP crashes, for instance) you can try installing the packages from Apple. You only need to install one of them, not both.
Once downloading is done, double-click the dmg file. Drag and drop the GIMP icon to your Applications folder.

You can now eject the disk image by dragging it to the trash. You can also delete the dmg if you wish.

There's one small operation we can now perform to make it easier to use (note that this is not necessary). Doing this will save you many unnecessary double-clicks during editing by not requiring you to activate GIMP windows before you can click on them. While Gimp and X11 are closed, open /Applications/Utilities/Terminal, and paste the following command in it and press enter:
Path A : Installing X11 from XQuartz project
Download a full package like XQuartz 2.2 from the XQuartz project (XQuartz also provides updates to Apple's X11, if you never installed Apple's X11 make sure you get a full package) Simply install it by doule-clicking the package and following the instructions. Once this is done, you can continue to the Downloading and installing GIMP section.
Path B : Installing Apple's X11 package
Insert your OS X install disk and locate the Optional Installs package. Double-click it.
An installer window will appear. Continue using the buttons at the bottom until you reach the installation type step. When you have reached this step, expand the Applications subsection in the tree by clicking on the triangle next to it, and check element X11. Once this is done, click on the Update button to continue, and perform installation.If your are installing the X11.app for the first time from your Leopard Install CD (containing MacOS 10.5.0) on MacOS 10.5.2, you have to reinstall the 10.5.2 Combo-Update. Otherwise GIMP will crash. !!!
(Some people reported being unable to install the combo-update. In this case, try to get your hands on a OS X 10.5.2 install disk and install X11 from there. Otherwise, if it's impossible, just install the GIMP package for OS X 10.4, it should work anyway.)
Downloading and installing GIMP
Once X11 is installed, download GIMP from the Wilber Loves Apples file downloads. Locate the MacOS 10.5 Leopard subsection and pick either the PPC or Intel build depending on your computer. (If you do not know which one to download, select About this mac from the Apple menu)Once downloading is done, double-click the dmg file. Drag and drop the GIMP icon to your Applications folder.

You can now eject the disk image by dragging it to the trash. You can also delete the dmg if you wish.

There's one small operation we can now perform to make it easier to use (note that this is not necessary). Doing this will save you many unnecessary double-clicks during editing by not requiring you to activate GIMP windows before you can click on them. While Gimp and X11 are closed, open /Applications/Utilities/Terminal, and paste the following command in it and press enter:
defaults write org.x.X11 wm_click_through -bool true
A few more things to note:defaults write com.apple.X11 wm_click_through -bool true
GIMP can now be opened by double-clicking on its icon in your applications folder! Note that the first time you open it, there will be a slight delay before anything appears on screen.
Happy Gimping :)