He probably did something extremely fanastically awesomeliciously sweet. (: I mean, if a boy I absolutely hated, say, gave me a copy of Harry Potter and the Deathly Hallows signed によって JK Rowling and took me to the premiere of DHPart I the Movie, I'd probably fall in 愛 with him, too. (:
I think that she didn´t really hate him... I think that she had already fall in 愛 with James, but was too ashamed to say the truth. Happens all the time, specially because James was a trouble-maker and she was a good girl.
I think deep down, Lili had a crush on James. After Snape called her a mudblood and James defended her, i think she found it kind of sweet, and supposedly he stopped attacking people at ランダム times the 次 year, that's when she let herself fall ni love.
He began 芝居 like less of a bullying jerk in their final year, and realised that his 表示中 off behaviour wasn't impressing her like he wanted it to. So she gave him a chance, and she fell in 愛 with him.