If you install Homebrew (https://brew.sh/) you can install the latest version of GIMP that works with brew update && brew install --cask gimp in the Terminal. You will need the xcode command-line utilities installed but Homebrew with guide you through that when needed.
Sorry but I do not want to open another can of worms, do this and then that. Much simpler to know which version works out of the box. At least you were good enough to say that you don't know what version. Maybe someone else will know.
The official download page for all things GIMP! Please only use the official binaries provided here unless you really, really know what you’re doing (it’s the only way to be safe). We try to provide binaries in-time with regular releases, but may occasionally be delayed as the packagers …
Nevertheless (if you insist upon using GIMP in the Mac OS sphere (as ifrit05 already suggested)),
# brew tap homebrew/cask && brew install --cask gimp
is probably gana give you the least amount of headaches
GIMP was designed for an entirely different operating system, with a (somewhat) different rationale, and truly insists upon a set of philosophically operational parameters not-entirely conducive to using said software on an Apple comp.
You are the one choosing to "open another can of worms" by making the choice to install said soft on an OS that (if I may say, "lightly") runs counter to said soft.
I'd, personally, plop a Debian install onto the 2011 iMac, install GIMP, and enjoy the fruits