Do you need a travel permit to go through Heathrow. If so, what is cost and how do you get one?
That depends on what country's passport you have.
If US or Canada, you don't need anything but your passport. As long as you are just connecting through Heathrow. If you need to clear passport control, you will need an ETA.
It depends on your nationality. But, if like most on here, you are from a country with a visa waiver agreement with the UK (The US, Canada, Australia, many others) then all you need is your passport if you are arriving and not staying or continuing on to another UK or Irish airport. This assumes this is all on one ticket and you are staying in the international secure zone. You can go on the Heathrow site and find instructions for your transfer.
If you are staying in the UK, you would need an ETA, or travel authorization, to enter.
You will also need an ETA if you have booked two separate flights and you are checking bags, as you will need to go through immigration, enter the UK to collect and re-check your bags.
Two flights on one booking or two separate flights but with carry-on bags allows you to take an airside transfer, avoid entering the UK officially and therefore you won't need an ETA.
two separate flights but with carry-on bags allows you to take an airside transfer, avoid entering the UK officially and therefore you won't need an ETA.
This is technically true, but may cause issues with your airline. Airlines are now responsible for verifying that you have an ETA. If you purchase a ticket from an airline, with a destination of the UK, they will require an ETA, or not allow you to board.
It is possible, if you show evidence of onward travel the day of landing, they may relent, or may not, how lucky do you feel?