According to bug 14292, clicking the "Download" link on an image in Gmail navigates to the image instead of downloading it. The image is downloaded as expected in Safari 3 beta on OS X.
<rdar://problem/5421965>
Obviously, the decision to use or download the resource is made by a delegate within Safari. I don't know how it makes this decision, since decidePolicyForMIMEType doesn't seem to provide enough information (there is nothing about the response in it, apart from MIME type).
I can no longer reproduce this; presumably fixed in <http://trac.webkit.org/projects/webkit/changeset/25796>.