If you cross the border on foot, it's really not a hassle at all. You just kind of walk in the general direction of a border agent with your passport open and get waved through. (It's literally only an hour's walk from the border to the southern tip so don't worry about getting around)
It really is worth your time to combine a trip to a bit of southern Spain if you're there already.
Also second flying into AGP.