I think I've worked it out by thinking in terms of binary numbers. 4 binary digits can represent any decimal number from 0 to 15. The numbers from 1 to 13 break down as follows:

4321

====

0001 = 1

0010 = 2

0011 = 3

0100 = 4

0101 = 5

0110 = 6

0111 = 7

1000 = 8

1001 = 9

1010 = 10

1011 = 11

1100 = 12

1101 = 13

Now think of each 1 in the table above as a rat that tries that wine. The key is to give each rat a mixture of wines such that the combination of dead rats uniquely identifies the poisoned bottle.

Number each bottle from 1 to 13, and each rat from 1 to 4. Then give each rat a mixture from the following bottles:

Rat 1 tries 1, 3, 5, 7, 9, 11, 13

Rat 2 tries 2, 3, 6, 7, 10, 11

Rat 3 tries 4, 5, 6, 7, 12, 13

Rat 4 tries 8, 9, 10, 11, 12, 13

Let's say that rats 1, 2, and 3 die. That gives you a binary number of 0111 = 7, so bottle number 7 is your poison. Rats 4, 2, and 1 keel over? That's 1011, or bottle 11.