- rats, Slang . (an exclamation of disappointment, disgust, or disbelief.)
Where does this meaning/usage of "rat" come from?
Drat is first used in the early 19th century as shortening of od rat, which was an euphemism for God rot.
Rats seems a shortening of od rat obtained by removing od, and used as plural to make it seems the plural of rat (the rodent).
[Reference: the New Oxford American Dictionary.]
Rats have a very negative image in the mind of people, and have had for long (I believe it started with 19th century’s urbanisation, and later intensified; earlier tales of rats feature them as rather nice animals living in fields).
They're typically associated with filth, bad smell, and have be blamed for transmitting diseases. This gave rise to a number of expressions, including “to smell a rat” and the associated meaning of rat (“a person regarded as despicable”). I believe this same popular perception of the animal is responsible for the interjection.