You don't get a licence as such in the UK. You register your kitchen.
I can't legally give you professional business advice, but I can share my experience with you and you can take from that what you will.
I had to contact the environmental health department at my local council to notify them I wished to trade as a food business from home. I had to do this at least 28 days before I wanted to start trading.
I actually contacted them well before this to check that my kitchen met the required standard. My EHO was very helpful. They aren't there to catch people out, they are there to ensure the public are safe and they want you to prepare food safely. If you're lucky they may be able to send you a leaflet (or point you to a web page) that details what standard your kitchen needs to be.
Councils do vary quite a bit in their approach, so yours will be able to tell you the next steps. But mine wrote and confirmed my registration notification. My council sent me a self-assessment questionnaire that I had fill out and send back to them. They still reserve the right to do an inspection at any time.
A lot of councils class home cake businesses as low risk, which is why they go down the questionnaire route. Especially councils in large cities, they spend most of their time inspecting hundreds of restaurants & cafes. However some EHOs come round and do an inspection within a few months of you opening instead of the questionnaire. You will need to ask your council what they do.
It didn't cost me anything to register, however my council required that I attend a Food Safety course and pass my Level 2 Food Safety exam. They sent me a list of approved ones in the area. Some councils will run these courses for a subsidised rate or some allow you to do an online course (mine doesn't). I personally think it's better to do a classroom course as you can ask the experts questions and its more about actually learning to be safe, rather than just ticking boxes.
I also asked for a (free) 'Safer food, better business' pack. It gives lots of advice and also acts as a cleaning record, supplier record and hazard record book. Keeping detailed, up to date records is really important especially if someone ever accused me of making them ill. Having a adequate records will definitely be in my favour.
As well as the above, I phoned my mortgage company to check they were happy with it, and also checked my house deeds to make sure there is nothing to prevent me running a food business. I live by the seafront in an Edwardian house and I actually have a clause in my deeds that says I can't sell fried fish (due to fish and chip shops I guess).
If you rent, you should to check with your landlord that its OK for you to run your food business from home. Running a food business, especially if clients will be coming to your home, can affect their house insurance or their buy-to-let mortgage so your landlord may not allow it.
House Insurance - I checked with my provider that they could cover me for running a food business from home. My monthly payments went up slightly. Some companies don't insure for home food businesses so you may have to switch. Definitely go to a price comparison site. I have found variation in price up to £1500 per year!
Public Liability Insurance - British ********** Guild (if you're a member) offer a good value PLI, but only for people earning under a certain amount from cakes a year. Anything more than that, and it pays to shop around. I personally get mine through Simply Business and its about £80 per year.
Finally, I registered with HMRC as self-employed (you need to do this even if you have another job). I registered within 3 months of starting to trade (though check this timeframe hasn't changed). You may need to ask their advice what to register as, I am registered as a 'sole trader'. I need to file a self assessment tax return each year. Keeping receipts of supplies and equipment I have bought and records of which cakes I have sold is essential. I highly recommend seeking advice from an accountant, they will be aware of where the tax breaks are and can help you fill in the assessment or do it for you.
In short, it's not difficult or costly to operate legally in the UK. It just requires a little time and effort. Good luck