Heathrow is beside Slough - have you flights already booked to Gatwick?
If going into Gatwick, Download the Citymapper app. Put in starting point and final destination. It will give you all the options for your journey, Time they will take, cost involved etc. Gives options with trains, buses...