To quote Randall Munroe, "The weird thing about escape velocity is that it doesn't matter which direction you're going. If you go faster than the escape speed, as long as you don't actually go toward the planet, you'll escape." Hence any angle (except one that would result in the rocket crashing into the ground) would work so long as the rocket achieved escape speed. Accounting for atmospheric resistance is tricky, since it varies depending on atmospheric conditions but also the speed. Most rockets actually don't throttle up fully until the atmosphere has thinned in an effort to use fuel more efficiently, though this is obviously of no concern to the railgun experimenters.
The bottom line is that spaceguns are rather impractical. The Federation of American Scientists website states that "A simple calculation based on a 1-kilogram cubic projectile launched at a muzzle velocity of 39,600 KPH at sea level shows that it will lose 20% of its velocity and a good part of its ablative thermal protection in the first 16 meters of flight." One of the most ambitious space gun projects, HARP, planned but never achieved a spacelaunch of a 5 kg projectile with a muzzle velocity of around Mach 21, though it is doubtful that the projectile would have orbited. The practical velocity you want to know is simply hypersonic, but an exact numerical value is difficult to determine due to the vast number of variables present.
EDIT: For further discussion of problems associated with non-rocket space launches, view Could we make a trebuchet that could launch objects to a stable orbit?