The European Commission has threatened legal action against the UK, saying a test of eligibility for benefits discriminates against foreigners.
The "right to reside" qualification for benefits is automatic for UK nationals but assessed for other EU nationals.
The commission said this breached EU law and gave the UK two months to say how it would bring its rules into line.
Employment Minister Chris Grayling said it was unacceptable "that we should open our doors to benefit tourism".
"It's obviously right that we support those who work and pay their taxes here, but it's clearly completely unacceptable that we should open our doors to benefit tourism," he went on.
But he added: "I'm really surprised that the European Commission has chosen to go into battle on this very sensitive issue, when there are clearly far more pressing problems to solve in Europe."
Ministers fear taxpayers could be forced into handing out more than £2bn to EU nationals, including so-called "benefits tourists".
A range of UK benefits - child benefit, child tax credit, state pension credit, jobseekers' allowance and unemployment support allowance - are given only to those with a "right to reside".
So will the UK cave in and pay up or will David Cameron show some backbone and ignore the EU?