Upvote:1
As stated in Timatic, the database used by Airlines:
Visa required, except for Holders of normal passports issued to nationals of Bangladesh holding a visa valid on arrival, issued by Ireland (Rep.), USA or United Kingdom or a Schengen Member State can obtain a visa or an e-visa on arrival, for a max. stay of 1 month. Fee: USD 30.-, EUR 25.- or GBP 20.-. The e-visa can also be obtained online prior to departure at www.evisa.gov.tr.
So you can either apply for an electronic entry Permit HERE, or you can get it at a Kiosk at Istanbul Airport.
Upvote:2
As stated in the website of Ministry of Foreign Affairs of Turkey, ordinary Bangladeshi nationals are required to have a visa to enter Turkey. However, since you have a UK residence permit, you are eligible to apply for a single entry e-Visa which is valid for one month.
Turkish Airlines, does offer guided tours in Istanbul for layovers of at least 6 hours. You can find more details on How To Apply on their website.