In reply to FesteringSore:
You must book in advance, we didn't and we couldn't get in at the last moment. Had an interesting walk around the outside though (steep hills, so hot walking!)
We camped just north of Granada at Beas de Granada (you can rent a cabin if you don't have a tent)and caught the local bus into the city, which saves the hassle of driving in the city and looking for parking. The Spanish bus service is great and cheap.
The camp site manager will do bookings for Alhambra (which we found out too late!)
There is sport climbing and great walking in the adjoining Sierra de Huetor, in these mountains to the north of the city, if you are interested in the Spanish Civil War there are also preserved Nationlist Trenches there from the investment of the Republican held city.