Prison should be, and generally is, a mixture of both rehabilitative and retributive justice.
I agree with souldevil that you should be treated not only a manner that reflects the severity of the crime you commit, but also how likely it is judged that you will reoffend. Rehabilitative care should be offered to all prisoners who will respond to the care, and likely not reoffend. No matter how severe the crime, if you show remorse, and show commitment to not reoffending, it would only make sense to offer rehabilitative care, and afford them the nice conditions that come with that.
It is likely cheaper to offer this care too. This would mean that most people would spend less time in prison, and they would not incur the costs associated with keeping them incarcerated.
Those who commit severe crimes, and show no remorse and will likely reoffend, and that rehabilitative care would not help, should be kept in cells and away from the rehab section of the prison population. Another purpose of prisons, after all, is to keep people who would otherwise be a risk to the public locked away.
The issue with this is how you can judge whether a person would benefit from rehab, or whether they are something of a lost cause. Someone could bluff their way out of this system, and commit a serious crime again. Likewise, someone who genuinely is remorseful could be sentenced to a life in prison.
It is interesting that you should mention gangs, because even if the individual is committed to living clean, if they were previously part of a gang, it is very difficult to escape that life. I don't think it's specifically an issue with the UK, and I don't think there is a lot a prison system can do to prevent this either. Prisons can only really benefit criminals who have been arrested. With the cuts police forces face in the UK as well, they do not have the resources to sufficiently combat gang crime. I think a combination of a bolstered police force, a better prison system geared towards rehabilitation and also social work to prevent people from becoming involved in gangs, and helping people escape gangs, would help combat gang crime massively.