I am flying to heathrow in transit to the USA. Can I go to the post office to post a gift to my friend? Is it possible for someone in transit to use the post office service? Could I buy a gift to send to my friend's home by courier or post?
You can purchase stamps and deposit letters in postboxes after security in each terminal (the online terminal map does not appear to say where exactly these are), so as long as your gift fits into the post box and you are able to buy enough stamps, then it is probably possible to send the item.
If you must use an actual post office, you would need to be landside at Terminal 3 to use the post office at the airport, requiring you to pass immigration during your transit. If you have time and no visa restrictions, the airport's post office is open from 0730 to 1730 on weekdays, from 0900 to 1730 on Saturdays and 0900 to 1300 on Sundays.