Four of the nine Supreme Court Justices (Ginsberg, Sotomayor, Breyer, and Kagan) think that the government could even force you to buy health insurance and arrest, fine, or jail you if you don't.
But those four plus Chief Justice Roberts think that the government can levy an additional tax on people who don't buy health insurance, so the ACA stands. (More on that here and here.)
The Anti-Injuction Act doesn't prevent the suit because legislation about how "taxes" act has to do with what congress calls a "tax", but judicial review depends on what's a de facto tax. (Including for enumerated powers, by that ruling. SCOTUS could have struck the law and said, "Try passing it with the word 'tax' actually in there," but they didn't.)
It seems that Roberts changed his vote after the initial conference?
The remaining Justices (Scalia, Kennedy, Thomas, Alito) disagree with the commerce clause argument (with Thomas writing an additional opinion that he even disagrees with the standard the court is using to decide commerce clause arguments, set in US v. Lopez; he feels that allowing Congress to regulate activity that "substantially affects" interstate commerce is way too broad), and think that the "it's actually a tax" argument is flim-flam. Scalia notes that there's precedent for the court viewing an excessive tax as a de facto penalty, but not for viewing a slight fine as a de facto tax (even if it's collected by the IRS, some other penalties are as well).
(But a law with the same effect that used the word "tax" would be constitutional under Congress's tax power, if the exceptions were stated as exceptions to the "tax" instead of exemptions to the "mandate", and the bill originated in the House of Representatives and followed the rest of Congressional procedure for tax laws? Scalia thinks "maybe" but is furious that question received approximately no consideration at all.)
Overall, I think it's better that the act stands, and I'm fine with the liberal justice's arguments on commerce clause grounds. But Robert's arguments that the "penalty" for the "mandate" is in fact a tax are really flimsy, Scalia demolishes him on those grounds. I think that Roberts was wrong to switch his vote on that ground. If he succumbed to outside political pressure, that's despicable. And come on, if he was really bowing to the realpolitik, shouldn't he have shifted his position on the commerce clause?
ETA: On further consideration, I do recognize that Roberts is taking a rather clever position here. He's holding back from a far more significant striking down of legislation than the courts have done in decades, while still admitting some limit to commerce clause powers, and he's giving the administration a nearly ideal outcome while still implicitly criticizing them for sneaking in a tax increase.