We report an approach assisted by deep learning to design spectrally sensitive multiband absorbers that work in the visible range. We propose a five-layered metal-insulator-metal grating structure composed of aluminum and silicon dioxide, and we design its structural parameters by using an artificial neural network (ANN). For a spectrally sensitive design, spectral information of resonant wavelengths is additionally provided as input as well as the reflection spectrum. The ANN facilitates highly robust design of a grating structure that has an average mean squared error (MSE) of 0.023. The optical properties of the designed structures are validated using electromagnetic simulations and experiments. Analysis of design results for gradually changing target wavelengths of input shows that the trained ANN can learn physical knowledge from data. We also propose a method to reduce the size of the ANN by exploiting observations of the trained ANN for practical applications. Our design method can also be applied to design various nanophotonic structures that are particularly sensitive to resonant wavelengths, such as spectroscopic detection and multi-color applications.