1856, "resembling a rat;" 1865, "full of rats;" 1867, "wretched, miserable, shabby," from rat (n.) + -y (2).
Shabby; slovenly; scruffy, tacky: The skinny Berkley, with her ratty hair and sharp teeth/ the rat-ass rags he's always wearing (1867+)