Britain’s 47-year membership of the bloc will end on the stroke of 2300 GMT — midnight Brussels time, three and a half years after a shock referendum vote to leave.