If all the galleries are html or php files you can ask your host to do a search and replace with a simple batch script using regular expression.
Like if affiliate links in all the galleries look for example something like: secure.xxxxx.com/track/XXXXX/
they can easily do a search and replace to change all the linkcodes to
http://someotherlink.com/