Can you be more specific about what happened when you were 'offered the job'? Who made this offer? Was there any discussion about salary or starting dates? Do you have any written record of this meeting, or any emails which explicitly refer to the offer of a permanent position?
It sounds like an over-enthusiastic line manager may well have overstepped their authority and made an offer with having confirmed things with HR. I guess you could possibly 'go legal' on the matter, but it sounds like this could be expensive, time-consuming and possibly fruitless.
Can you push the company to give you a shot at the interview, and/or extend your contract by a few months to compensate you?