Ultimately, gravity is a constant force acting on the bullet. Just because a bullet has been fired from a gun does not mean this force is any less, and so it will hit the ground in exactly the same time, just a lot further away
If you could shoot the bullet fast enough, and keep it moving at that speed, then it would never hit the ground because the natural curve of the earth would leave it in perpetual fall (orbit). If you shoot the bullet even faster then it won't hit the ground and just shoot straight out into space, and will then have broken free of the force of gravity (eventually).