A closed surface like a sphere encloses some volume. Anything coming out through the surface (the net outward flow which we call the flux) will be in the expense of what remains inside. If the sphere encloses some charge, then electric field diverging out from the volume containing the charge will be equal to the normal component of the electric field lines through the surface, which we call the electric flux.
The vector flux will be zero if the boundary and the surface are parallel. The electric filed is a special type of a vector which has a non-zero divergence if there is some non-zero charge. The electric flux will be zero only if there is no charge enclosing that surface.
However if you place an uncharged sphere in a uniform electric filed, the sphere develops induced charges. But there the charge is not residing inside the sphere but on the sphere. i.e, the charge induced is not enclosed by the sphere. So in that case the charge inside the sphere remains zero and you will get zero divergence and zero flux.
The Gauss's law states that the total electric flux coming out from a volume of charges is equal to the charge enclosed divided by the permittivity of the medium inside the surface.