Adaptations of gd are available for Tcl, Perl, Python, and other languages. See the gd page, listed above, for more information.
Macintosh users should look into clip2gif (available by anonymous FTP from orathost.cfa.ilstu.edu in the directory /public/oratClasses/ART389.88Seminar/software and from many other sites including Info-Mac in the directory gst/grf). clip2gif supports assembling images from other images via AppleScript.
Perl users may also be interested in pgperl <URL:http://www.ast.cam.ac.uk/~kgb/pgperl.html>, an extended version of Perl which supports GIF output and can be used to good effect in CGI applications.
It's also possible to use gnuplot and the pbmplus utilities. These approaches is slower, but can require less programming if gnuplot is sufficient for your purposes. (See archie for both tools.)