If you fly to Heathrow and take a train between LHR & LGW you can do it two ways:
1) Get the regular bus that runs between LHR's main bus station and Feltham train station. A single costs 70p on the bus. At Feltham station get a London bound train (about every 10-20 minutes) and stay on it until you get to Clapham Junction Station. At Clapham, get off the train and go to platform 13. About every 20 mins is a train to the south coast which stops at LGW. There's a station actually inside LGW's South terminal so the journeys nice and easy. The train will cost about £10 and the journey from LHR to LGW will take about 2 hours, but could be longer.
or option 2!
2) Take the Heathrow Express train direct from LHR to Paddington Station, London. They run every 15 mins and I think the journey only takes about 15-20 minutes. The cost is about £11 single I think.
At Paddington take the London Underground (Tube) on the Circle Line to Victoria. The tube journey will take about 10-15 minutes and probably cost about £2. At Victoria get the Gatwick Express train to LGW, which should cost about £8 and take about 30 mins. Trains depart every 15 minutes.
These might help:
I think there's probably a regular coach shuttle between LGW & LHR, but I'm not sure.
Have a great journey!