Yes. In principle, nothing prevents you from enclosing the building, unless otherwise stipulated in the easement deed. If this is not the case, article 701 of the French Civil Code prohibits the owner of the servient land from "diminishing its use or making it more inconvenient". So, if you decide to close the gate, you'll need to give your neighbor a key.

Welcome on the new website notaires.fr !
une vigilance accrue s’impose à tous
Your website notaires.fr had a makeover! It has been redesigned for a smoother and more pleasant navigation.