From takeourword.com
".....it has its roots in the field of astronautics in the late 1950's. When splashing down back on earth, a spacecraft was said to be in the ballpark if it landed within a designated area. This was taken from baseball, of course, where balls which were hit within the ballpark were still playable, versus those hit out of the ballpark, which were usually home runs. Therefore, a ball landing inside the park was considered a good thing for the team in the field. Ballpark first appears in print in this astronautics context in 1960, when the San Francisco Examiner noted that "[t]he Discoverer XIV capsule...came down 200 miles from the center of its predicted impact area, but still within the designated �ballpark� area."
The term spread from the astronautics industry and came to be applied to anything which was "close" to correct."