Chief Justice John Roberts (who turned out to be the swing vote) wrote the opinion for the majority, and stated while Congress did not have the power under the Commerce Clause or the Neceesarry and Proper Clause, the Taxation Clause does grant Congress this power–even though Congress specifically avoided making this a tax because taxes are unpopular.
Though the court says Congress can issue the individual mandate under its taxation power, it says that the Anti-Injuction Act (which does not allow preemptive court challenges of taxes) does NOT apply because the label "penalty" is controlling on this particualr issue. This seems totally bizarre.
I will be back with more analysis after I read the opinion. But my gut reaction is that this ruling is an absolute travesty. Get ready for a hard pivot by progressives from agressive readings of the Commerce Clause to agressive readings of the taxation power.