
Originally Posted by
jmagz
It's never stated in the books but
Spoiler
I believe it was Olenna Tyrell, Margaery Tyrell's mother (Or grandmother, the old one whatever)
The poison was one of the crystals on Sansas necklace that she gave to her and sometime during the episode she's talking to her and very close to it, I believe she took one and put it in Joffrey's drink at some point, all Joffrey had to do was keep drinking and eventually he'd get all the poison in the cup if it had coated it or it may have just taken awhile to kick in.
Remember when they're asking Sansa how Joffrey is and she says he's a brute, a monster etc and all she says is that's a pity.