To save yourself energy,time and money, travel by underground. Take the Piccadilly line direct from Heathrow to Hammersmith, then cross the platform to the East bound district line direct to Barking which saves you traveling time plus money if you use the OYSTER card.
Arrivals from Gatwick, take the
Gatwick Express rail service to Victoria Station, then take the Underground (Subway) head to the District Line going to either Barking or Upminster going East. To save time if you are going to Barking, it is faster to take the train to Blackfriars Station then change to the district line east bound to Barking.
If you are traveling from Luton airport, to Barking, take the train to Blackfriars station and change to the district line east bound to Barking.