If you know about the Time Lock you should already know why he can't visit there.
There is no time or place where Gallifrey was still around. At the moment that the Time Lock was set into place, Gallifrey (and Skaaro, and apparently a whole TARDIS-full of really nasty stuff) was removed from the space-time continuum completely. That means that, as far as everyone outside of the Time Lock is concerned, none of those things exist or ever existed or ever can exist anymore.
But, since Time Locks are presumably Time Lord level high-order technology, they're clearly not going to operate in a way that will destroy the universe every time you turn one on. While the existence of Gallfrey as a distinct location in space or time ceased to exist, none of the events that occurred there prior to the Time Lock's initiation were erased. The Time Lords still did all of those things, the Doctor still visited all of those times, and all of the ramifications of those actions rippling through time still happened. At the very list, they must have or the Time War itself would not have happened and the Time Lock would never had been initiated.
Sufficiently time-aware beings, like the ones that make up the Shadow Proclamation or the Time Agents, still seem to remember the Time Lords and Gallifrey. They exist only as legends, however, things that occurred in some fuzzy, non-specific distant point in the past (even though from The Doctor's perspective the Time War only ended in 2005 Earth Time.)
There has been some confusion over what my last paragraph meant, or how it was relevant. The point I was making involved how the placement of the time lock affected the universe as a whole, and how those people/places/etc involved in the Time War can no longer exist even in the past without creating a paradox. I'll try to elaborate a bit, but fair warning: below is a mix of fact and speculation, so please consider this a "non-normative" part of my answer.
First, we have to accept that our concept of linear, cause-to-effect time doesn't hold in Doctor Who. There's no way we can put a "start" or "end" date on the Time War because it happened across all of time. To a low-tech species like humans, I suspect it just suddenly appeared at some point as if the war had been going on forever, even if we just became aware of it.
So, the problem with talking about a time "before" the Time War is that such a thing can't exist, because if it did, the time lock would be useless. It would also potentially create major risk of paradox: what if a pre-Time War Time Lord traveled into the future, saw the aftermath of the war, and went back and changed things?
So the Time War can only meaningfully be described as occurring everywhere at all times. Thus, the time lock must have simultaneously removed all of those events from the entire history of the universe. But that leaves huge gaps in the timelines of any creatures that ever came into contact with the Time Lords. As we see over and over again, though, the universe is very good as smoothing over paradoxes in the least problematic way possible. Its also possible that the time lock itself plays a role in making this all work; either way, something comes along and repairs time.
In this case, what appears to have happened is that the very existance of Gallifrey and the Time Lords has been excised from history, but all of the things they did still occur. So people still have this vague idea that something called a "Time Lord" existed, but they can't pinpoint exactly when that was. Certain beings even remember the Time War as a thing that happened, but only in vague terms. The Doctor, on the other hand, remembers it vividly as having just happened to him, recently, when he arrived on Earth in 2005. (I should also note, though it doesn't make much difference, that in his mind he really did go right from the Time War to 2005 -- he doesn't remember the part in London with 10 and 11.)
So, for example:
- If you asked Nine, e.g. in Rose, how long ago the Time War was, he would probably say it just ended.
- If you asked Jack Harkness, at the same time (before he met The Doctor), the same question, he would tell you that Time Lords were just a myth and the Time War ended so long ago no one even knows if it really happened.
- The lady at the Shadow Proclamation calls the Time Lords "the stuff of legends".
- The Sontarans specifically remember the Time War as being a war they were not allowed to participate in (which is why they weren't trapped in the time lock)
- The Sycorax Queen still remembers the Time Lords and what they did (and her species is still wiped out).
The point is, many of those people are time-aware; Jack Harkness is himself a time traveler. He would be well aware of the problem with claiming something happened "a long time ago" just based on what year it was on Earth. But even to those beings who understand the nature of time and can move through it, the Time War is such a "distant memory" that they aren't entirely convinced it really happened.
IMO, all of this is tied together: locking the Time War and all of it's participants away behind the time lock resulted in this fuzzy, seemingly inconsistent state where some people remember the Time War clearly and others don't think its real, or that it happened "a long time ago", even for people where "a long time ago" should be a meaningless phrase.