There are many things have caused GM to be in this situation, but I think it can all be traced back to one thing - short term stock price thinking. American companies are very short term ortiented because of the share holders and the executive compensation packages. As a result, when a decision has to be made, the choice with the best immediate impact is typically chosen. Meanwhile, the japanese companies, especially Toyota, have been working with long term strategies. Toyota knows that if they sell a compact car to a young person as their first new car, and they have a good experience with it, they will come back years later and by a mid-size vehicle, and maybe someday a large vehicle such as Lexus. GM, Ford, and Chrysler can't make a profit on small cars, so they quickly abandon their smaller vehicles. Very different strategies.
Example: Many people blame the UAW for GM's woes. While the union labor contracts are over the top IMHO, GM agreed to these concessions when times were good to avoid strikes which would hurt short term profits and stock prices.
Example: While gas prices were low, and the margins were good on large SUVs, GM went full bore on the SUV market. During this time, they let Saturn struggle with very little new product, killed of Oldsmobile, but launched the hummer H2.