Pain in the arse is a fair comment for buying train tickets in China.
Tickets go on sale something between 20(ish) and 3 days in advance. Sometimes you can buy a ticket XXX-YYY in YYY. Sometimes you can't.
And the queues at stations can be daunting. Especially during Spring Festival.
To the OP - options are chinatripadvisor and their inflated comissions, or take a chance. If you take the latter option you'll be pleased to hear that it does generally work out in the end.