It's still practiced, but only with the consent of the patient. It can give some relief to sufferers of depression, schizophrenia, etc.
There's a lot of debate around it still, and rightly so because it's a damn crude form of treatment. Noone really knows why it works, just that convulsions seem to have a positive effect on certain mental disorders... in some people.
ECT was much more reliable and less dangerous than many other therapies that were devised in the 30's, so it caught on. From there, it was abused to control patients in mental hospitals, rather than treat them. That's where its bad rep came from. Forcibly inflicting ECT, ala "One Flew Over The Cuckoo's Nest" was indeed barbaric, though not on the same level as an ice pick lobotomy.
Some people report good results, but some are distressed and shamed by it. There are worries about possible mental impairment or memory loss, which are dismissed by institutions. So yeah, we kind of know what we're doing when it comes to mental illness. Sort of. We'll know better when we can finally define "mental illness".