Miles/gallon: Newer vs Older Cars

Probably most of us are on this site due to the 60s muscle cars. But some newer cars have high horsepower, pass smog, and have reasonable fuel economy. I know new technology helps, but were the older cars just a lot more inefficient? Where have the main improvements come from?
Probably fuel injection and electronics are biggest improvement....