"is there anywhere close to park outside the Territory of Gibraltar in Spain & walk or take a local bus to tour the area? "
In Rick's Spain book, he has exact directions for getting to the parking lots in La Línea, which is the Spanish city just across the border from Gibraltar. You then walk across the border; while doing this you cross the Gibraltar airport's runway, so if there's a flight arriving or departing, you have to wait!
The Spain book also has details on how to tour Gibraltar on your own, bus routes to get around, etc. If you're just going to Andalucia, you can instead get the Snapshot: Sevilla, Granada & Southern Spain book, which has just that section of the larger Spain book.