Gibraltar said it is confident the treaty on its relationship with the European Union will be concluded before the end of the year.