Shoot a gun straight up. If the bullet will eventually fall back to the earth, then the muzzle velocity of the bullet was less than escape velocity. If the bullet never falls back, then the muzzle velocity was greater than or equal to escape velocity. The mass of the bullet doesn't matter, just the speed (although it will of course take a more powerful to gun to fire a heavier bullet at the same speed).
In practice, no traditional gun is capable of firing bullets at speeds greater than escape velocity, which is why we use rockets to launch spacecraft instead.