Failure to reach a Brexit deal would be the sole responsibility of the UK, the president of the European Commission has said.