Methods to detect naturally infected individuals, especially during or after a pandemic, are valuable in populations with a high rate of vaccination. Having in mind that after the COVID-19 pandemic people has been vaccinated against the virus by Spike protein (S)-based vaccines, we present in this paper a novel nanosensor based on gated nanoporous anodic alumina (NAA) material to detect naturally infected individuals in populations with high rates of vaccination. The nanosensor developed is based on a protein-capped nanomaterial for the identification of IgG antibodies that can detect nucleocapsid protein (N) of SARS-CoV-2. The NAA material has been loaded with an indicator (Rhodamine B (RhB)) and the pores of the material have been blocked with SARS-CoV-2 nucleocapsid protein (N) attached to a specific aptamer. In presence of antibodies against this antigen, the pores are uncapped, triggering the dye release and a fluorescent signal as a result. The biosensor has been tested in vitro and simulated serum for IgG detection, proving a detection limit of 1 µg/mL. Moreover, specificity assays with N proteins from other coronaviruses have proved the robustness and efficacy of this nanosensor. Finally, the system has been tested on samples from patients that contained SARS-CoV-2 antibodies, demonstrating its potential for the discrimination of individuals that have been vaccinated or infected by SARS-CoV-2 virus.