Ruby 1.9 + SDL (380 325325 314)
EDIT: 314 characters, and fixed a bug with extra cells appearing alive on the first iteration. Upped the grid size to 56 since the color routine only looks at the lowest 8 bits.
EDIT: Golfed down to 325 characters. Grid width/height is now 28 since 28*9 is the largest you can have while still using the value as the background colour. It also processes only one SDL event per iteration now, which obviates the inner loop completely. Pretty tight I think!
The simulation starts paused, with all cells dead. You can press any key to toggle pause/unpause, and click any cell to toggle it between alive and dead. Runs an iteration every tenth of a second.
The wrapping is a bit wonky.
require'sdl'
W=28
R,b,p=0..W*W,[]
SDL.init 32W=56
R=0..T=W*W
b=[]
s=SDL::Screen.open S=W*9,S,0,0
loop{r="#{e=SDL::Event.poll
r=e.class.name}"
r['yU']?p=!p $_^=1:r[?Q]?exit: r['nU']?b[e.y/9*W+e.x/9]^=1:0
b=R.map{|i|v=[~W,-W,-2755,-1,1,2755,W,29]57].select{|f||f|b[(b+bi+f)[i+f]%T]}.size;v==3||v==2&&b[i]}if pif$_
R.map{|i|s.fillRect i%W*9,i/W*9,9,9,[b[i]?0:S]*3}
s.flip
sleep 0.1}
Looks like this:
Fun challenge! I welcome any improvements anybody can see.