It's complicated, and has to do with industry politics. You see, Marvel has made an unbelievable shit-ton of money over the last ten years, leaving everyone in Hollywood agog, including the voters of the AMPAS. Ordinarily, they'd reward such Excellence in Making Money with some major awards, but the AMPAS is extremely prejudiced against any films but realistic dramas - they are dead set against giving awards to comedies, sci-fi films, teen films, animated films, movies based on TV shows, remakes, and especially comic-book films!
But... everyone can see the end of the Marvel money train in the distance, with the "Infinity Wars" films they're going to wrap up their current series of moneymakers, and some other fad is going to come along. So they start to consider giving the Marvel people some sort of award while the show is still on, and well, if there are only a few major Marvel films coming up, which ones can they award for what? Well, there's "Infinity Wars" itself, but it's not a fantastic movie and not really comprehensible if you haven't seen all the previous films. There's the animated Spiderman film, but there's double genre prejudice there so that's not happening. And then there's "Black Panther" and "Captain Marvel", which break the color barrier and the woman barrier, respectively, and, well, "Black Panther" is a good movie that everyone enjoyed.
So it got nominated for Best Picture, which is as much recognition as the AMPAS is willing to give a comic book movie.