if [ "$(which gimp)" != ""]
] must be the [ command's last argument, and it must be a separate argument, hence you need a space before it. See Bash Pitfall 10.
But, don't use which. It is a non-standard, external command that looks for a file in PATH. It behaves differently on different systems, and you can't really rely on a useful output or exit status. The shell already provides better ways of checking if a command exists and will work consistently on any system, so better learn those. See Bash FAQ 81. In this case though, you don't need to test if gimp exists, just running gimp -version, or querying dpkg about the version of the gimp package (see dpkg-query(1)), will already tell you whether it exists or not.
if [ "$(gimp -version)" != 2.8 ]
AndAC already gave a solution for this one, but I'll provide another one; comparing the version numbers. dpkg provides a way to compare two versions, namely dpkg --compare-versions ver1 op ver2. E.g. dpkg --compare-versions 2.6.12 '<' 2.8.0-1ubuntu0ppa6~precise will return true since version 2.6.12 is older than 2.8.0-1ubuntu0ppa6~precise. See dpkg(1).
All the brackets ({ and }) in that script are pointless, they serve no purpose, so you might as well remove them.
Putting this all together:
#!/usr/bin/env bash
# Query dpkg to get the version of the currently installed gimp package.
# The command returns false if the package is not installed.
if version=$(dpkg-query -W -f='${Version}' gimp 2>/dev/null); then
# Check if it's older than 2.8
if dpkg --compare-versions "$version" '<' 2.8; then
apt-get remove gimp || exit
else
printf 'Looks good.\n'
exit
fi
fi
add-apt-repository ppa:otto-kesselgulasch/gimp &&
apt-get update &&
apt-get install gimp