I have been residing in the UK since November 2014 on a settlement residence visa which doesn't expire till July 2017. I left the UK on 04/03/2016 for a 11-day short visit in Ghana via transit through Istanbul (Ataturk) on Turkisk Airlines and return to London on 15/03/2016 via same return ticket. I have a Ghanaian passport which expires on 17/03/2016, 2 days later after I arrive in London. I have spoken with the UK Border Agency and they say there's no problem with me entering the UK so long as my Ghanaian passport hasn't expired whiles entering the UK. Can I transit through Turkey with the 2-day passport validity period, considering I reside in the UK?
Yes, you are correct!. you can transit through Ataturk istanbul airport (look for transfer to international terminal) with valid passport (not expired) along with UK visa.
There will be problem if you try to enter Turkey holding passport less than 60 days validity.