Hi -
We do a similar journey to this quite a lot and I believe the best thing to do is to book an 'Advance' ticket via the National Rail website, or Virgin East Coast website. This will significantly reduce the cost of your journey, but will tie you to a specific timed train.
As a 'for instance' we will be flying into Heathrow from Seattle (we are coming home!) later in the year arriving at about the same time as you. I tend to allow a bit of time for clearing immigration, baggage collection, the journey to the main line station (more on this in a moment) and for the flight to be slightly late.
Thus while we land at about 07.45 I've booked us on the train home at around 13.00. We live not far from York (see my location!) and our train north departs from Kings Cross, as do trains to York. The journey from Heathrow is by Tube on the Piccadilly line and takes about an hour to Kings Cross. I wouldn't be tempted by the Heathrow Express as although it's quick, it's expensive and it doesn't go to the correct station and you'll end up changing to the Tube to get to Kings Cross, probably on the Piccadilly line anyway. Best to get on at Heathrow and get off at Kings Cross without changing. While you will be aiming for a specific train at Kings Cross, you can get on any of the Tube trains.
Book your ticket from London Heathrow to York via Kings Cross - I think if memory serves, my most recent ticket purchase via Virgin East Coast offered the option something in the vein of 'Heathrow Underground zones 1-6' and that's the option you want. Definitely reserve a seat on the Kings Cross to York train as these mainline trains are frequently full or at best, very, very busy. Last thing you need having just got off your transatlantic flight is to spend two and a half hours trying to remain upright as the train speeds northwards! (I've seen this happen - doesn't look fun!).
Your train might not terminate in York - it may be the Edinburgh train - check out the 'calling at' section on the departure boards at Kings Cross.
If you whizz through immigration, collect your bag easily and the flight is on time, and you reach Kings Cross early there's plenty of shops and cafes (we like 'Leons'!) to pass the time in while you wait. Platforms are routinely announced via the departure boards 10 - 15 minutes before the train leaves.
If you are late and miss the train then you'll need to negotiate with station staff to see what they'll let you do. In theory, they may insist that you pay the difference between your Advance price and the walk up price which can be considerable. This is why I allow a fairly lengthy time between arriving at Heathrow and the train north. But it's worth throwing yourself on the mercy of the staff - you may get a sympathetic one who'll allow you to travel on another train that you aren't scheduled to travel on. Or maybe you can organise a swap for your tickets to another train (explain your flight was late - trowel it on!). Always worth attempting to negotiate! For what it's worth, we've, so far, never had a problem as we've always arrived with time to burn to make the connection.
Enjoy York! Have a great trip!
Ian