$1 eV$ is defined as the energy gained by an electron when accelerated through a potential difference of $1V$. But, I think when the electron is accelerated, it gets closer and closer to the source of voltage and the electric force increases at the same rate, thus increasing the acceleration, and in turn, increases the energy of the electron. Is it correct or what else is happening?
When the electron gets closer and closer to the "source of voltage", as you call it, its energy will keep increasing. It will only be exactly 1eV precisely when the voltage difference from the point it started from to the point it just reached is 1 volt, and then it will keep increasing.
Picture two infinitely large flat parallel plates that have a charge difference, and the electron falls from the negative to the positive plate. If the plates are not flat, not infinite, or not parallel, then the electron gains energy at a different rate at different points in its fall. But since they are flat, infinite, and parallel, the energy gain is constant (barring quantum effects). However, even if the plates are not uniform, the total energy gained by the electron for the complete fall will be the voltage difference between the plates. This is because an integration of the field strength over the path will be constant.
I don't think that how electron accelerates or what it does while crossing energy barrier matters.All that which matters is the potential difference between two points.
For ex:-It doesn't matters how a body is taken up in earth's gravitational field because potential difference remains same,it doesn't changes with the kind of motion the body undergoes.It can move in a helical path,circular path or straight line path.Still the potential difference remains the same.It doesn't matters that when the body is very close to surface of earth it accelerates more because potential gradient remains the same.