If it looks like a duck, quacks like a duck, and walks like a duck, it must be a duck, even though you call it something else. Very often a court will look through the form of a transaction to see what actually happened.
Francis Field paid $24,559 directly to a medical provider for her adult daughter, Judith Lang. In addition to paying Judith's medical expenses, Mrs. Field paid $5,508 to the town to cover taxes on real estate Judith owned.
In Schedule A of her 2006 income tax return Judith claimed $24,559 as part of her medical expenses, and $5,508 as real estate taxes paid. The Internal Service denied both deductions, because Judith did not pay those amounts - her mother did.
In a trial in the United States Tax Court, Judith argued that, while the form of the transactions was that her mother sent checks directly to the medical provider and the municipal government, as a matter of substance her mother made gifts of the two amounts to Judith, and Judith paid the medical expense and the taxes, so the deduction by Judith should stand. The Tax Court agreed.
The Court said that while in form Mrs. Field made the payments directly, she intended them to be gifts to Judith, so in substance the payments were gifts to Judith and payments by Judith to the medical provider and the municipality. Therefore, Judith was entitled to deduct the payments on Schedule A.
Mrs. Field made the payment directly to the medical provider so that it would not be counted as a gift - payments made directly to medical providers on behalf of someone else are not counted as taxable gifts. The gift tax status of the payment, however, has nothing to do with the way it is treated for income tax purposes.
The "substance over form" argument is a favorite of the IRS along with the "step transaction" doctrine. Under the step transaction doctrine, if you go from A to B to C to D to E in a series of steps you may be treated as going directly from A to E. This case shows that these doctrines work for the taxpayer as well as the IRS.

