The Patio de la Reja was built between 1654 and 1655 to serve as the courtyard for the
Habitaciones Imperiales (Emperor's Chambers), which were a set of rooms intended for Emperor Charles V. The courtyard is named after the wrought iron grille balcony that runs along the top of its southern wall.
Source:
The Alhambra and the Generalife: Official Guide. Madrid: Patronato de la Alhambra y Generalife and Tf Editores, 2010.