Molydood is right, the range of the gravitational force is infinite. Therefore, it is technically never correct to say something "leaves" the gravitational field, even if it is launched with escape velocity. Escape velocity simply means that the object will never stop moving, i.e, will never fall back towards the Earth, in this case. That is, the total energy of the body will always be positive (K+U > 0 for all time).
Now, let's see about your equation. You have:
[tex]2gh=v_f^2-v_i^2[/tex]
Now, you're obviously using the gravitational potential of the Earth in the h<< radius of Earth approximation. This works fine for throwing up balls and such, but is certainly incorrect for an object with escape velocity. In the cases where the distance from the center of the Earth is comparable to the radius of the earth, you need to use the full Newtonian potential:
[tex]U=-\frac{GMm}{r}[/tex]
I won't go through any more of the treatment of the escape velocity problem, but you can see that while this potential goes to zero as r approaches infinity, it is NEVER zero. Therefore, an object will never leave the gravitational field of the earth, no matter what velocity it initially has.