The key is what gibsonf1 pointed out. Each worker at Toyota is much more productive than each worker at GM (and most likely other companies).
They also benefit from a halo around them of 'superior quality'. I'm not entirely sure if a big quality difference actually still exists (it definitely did once), but in the minds of many, Toyota will always be the 'reliable choice' which allows them to charge more for their vehicles than GM can for it's equivalent.
It also didn't help that GM made ugly cars for years, and even today is only marginally improving. I sincerely hope the Volt actually happens as planned, both for nerdy reasons, and because it'd be nice if GM didn't blow a golden opportunity to save itself (and my dad's retirement).
Sweetheart deals by unions in the 70's prior to Japan coming into the picture are a part of what is causing GM to falter.
That doesn't explain their ugly ass cars though.