A teacher who ‘entered into an inappropriate relationship’ with a pupil has been banned from teaching indefinitely.