Jose Manuel Barroso said an independent Scotland would have to apply for EU membership and obtain the approval of all current member states, in the wake of a Yes vote in September's referendum.
Mr Barroso said he respected the ongoing democratic processes surrounding the independence debate and said it was for the Scottish people to decide on the country's future.
But he added: "In case there is a new country, a new state, coming out of a current member state, it will have to apply and ... the application and the accession to the European Union will have to be approved by all the other member states of the European Union."
He said: "I don't want to interfere on your referendum here, your democratic discussion here, but of course it will be extremely difficult to get the approval of all the other member states to have a new member coming from one member state. We have seen Spain has been opposing even the recognition of Kosovo, for instance.
"So it is to some extent a similar case, because it's a new country and so I believe it's going to be extremely difficult, if not impossible, a new member state coming out of one of our countries getting the agreement of the others."
Finance Secretary John Swinney called this "preposterous" given Scots had been EU citizens for 40 years and the country complied with EU laws and fiscal rules.
The European Union and sterling will be centre-stage when Alex Salmond launches a concerted fight-back today with a speech to a business audience in the north-east that promises to be a "point-by-point demolition" of George Osborne's recent onslaught when he said that if Scotland walked away from the UK, it walked away from the pound.
Mr Salmond said yesterday: "The
reality is the pound is as much Scotland's as the rest of the UK's. By suggesting otherwise, the Westminster establishment - Tories, Labour and LibDems - are reaping a backlash from the people of Scotland, who feel this is an attempt to bully Scotland."
He added: "I will be deconstructing the Chancellor's ill-thought out intervention, making clear why a currency union not only favours Scotland but is in the clear economic interests of the UK as well. He will have to wake up to the fact he cannot lay claim to assets to which Scotland has a share - such as the Bank of England and the pound - and still expect an independent Scotland to meet a share of UK liabilities."
Alistair Darling, leader of the Better Together campaign, said: "On the two biggest issues for jobs and businesses in Scotland, currency and Europe, the nationalists are all over the place. We are being asked to take a huge leap into the unknown. When Alex Salmond is told Scotland won't keep the pound, he says everybody is bluffing and only he is right. When the president of the European Commission says there would be huge difficulties with EU membership, the nationalists say he is talking nonsense. It isn't credible."
Scottish LibDem leader Willie Rennie said: "The EC president knows more than most how other countries will react to an independent Scotland's application to join the EU. He can't be aggressively dismissed with Alex Salmond's characteristic bluster."
Scottish Conservative deputy leader Jackson Carlaw said: "The Scottish Government are in a position where they are telling the UK Government they are wrong, business leaders they are wrong, the Governor of the Bank of England he is wrong, and now Mr Barroso he is wrong. This incredible tactic sinks the SNP to new depths."