After two curators began doubting the painting’s authenticity, they made an unexpected discovery about its origins