Does a US taxpayer have a cause of action against the federal
government for anticipatory breach of contract?
Not really.
True breach of contract claims
The U.S. government can be sued only in cases where it waives sovereign immunity. Breach of contract, however, is an example of a waiver of sovereign immunity (and is a cause of action which the U.S. Constitution prohibits the U.S. states from making subject to sovereign immunity, and by implication prohibits the U.S. government from doing so as well, although the state secrets privilege can sometimes have the same effect in practice).
An actionable breach of contract through an anticipatory breach would be, for example, if the U.S. government ordered 10 tanks for $300 million, and they were delivered and accepted, but the U.S. government indicated definitively before the payment was actually due that it would not be paying for them, despite not having any valid grounds (e.g. defective goods) to justify its non-payment.
In that situation, the aggrieved seller could bring a lawsuit in the U.S. Court of Claims for damages against the United States and could be awarded a judgment in that forum, which would give rise to a legal right to have the United States government pay the amount of the judgment.
Claims that are not valid breach of contract claims
But, the context of the question makes clear that the alleged contract claim is not actually a breach of contract. Instead, the question is implicitly asking about a departure from a longstanding a policy commitment (e.g. in the case of Social Security or Veteran's benefits) upon which many people have relied.
These kinds of policy commitments are not legally binding promises or contracts. As a result, a departure from a longstanding policy commitment upon which someone had relied is not a basis for a lawsuit against the United States and does not give rise to any legal obligation.
U.S. courts do not recognize taxpayer standing.
Also, as noted in an answer by Trish, someone does not standing to sue for a breach of contract that harms the public or taxpayers generally, merely because that person is a taxpayer, as opposed to a lawsuit because that person has suffered economic or legal harm that impacts that person, in particular, on an individualized basis, in a manner different that that of other taxpayers.
Remedies
Where the remedy the taxpayer is seeking is withholding currently owed
taxes?
Generally speaking, the only kind of contract that the U.S. government would make with a taxpayer that would be enforceable by non-payment of taxes allegedly owed would be a settlement agreement reached with the IRS over the amount of taxes that a taxpayer owed in a particular cases involving a disputed tax liability.
Otherwise, even when the U.S. government does owe money to someone, withholding currently owed taxes is never a valid remedy for a breach of a legal obligation of the U.S. government, even it a court establishes that the U.S. government breached a contract and enters a money judgment in their favor as a result.
These respective obligations are independent of each other. Setoff of a tax obligation owed to the U.S. government against a judgment awarded against the U.S. government is not allowed, except possibly when expressly authorized by a court order in a bankruptcy case.