I'm still working on this, at present it's way too simple, but effective nonetheless.
Set up a Mail rule: If "Any Attachment Name" contains ".gif" "Move Message" to mailbox "Junk".
Its a bit draconian, but hasn't had any false positives here. If you're worried just set the color of the message text or background instead of moving it.
[kirkmc adds: I agree that I've never gotten a valid message that contains a gif file, so this is a perfectly useful rule. If you do get messages containing gif files, then don't use the rule, or check your Junk mailbox often.]
Mac OS X Hints
http://hints.macworld.com/article.php?story=20061022043853766