From the Wikipedia article:
Gangs of New York is inspired by Herbert Asbury's 1927 non-fiction book, The Gangs of New York.
Because it was "inspired" by it, not "based" on it. Herbert Asbury's book (as you've mentioned in your quote) is non-fiction. It was about the real and historic Gangs of New York. Now the movie was completely fictional, only loosely following the real historic events (which Asbury didn't author but reported), so it's considered to be a standalone screenplay, not an adaptation.
Julia Turner at Slate had the same question back in February 2003:
Jay Cocks, a longtime Scorsese collaborator and one of film's three credited writers, told Explainer that most of the script was an original creation: "This is a world we conjured out of whole cloth, out of a whole lot of unassimilated historical research." He says Asbury's book, which Cocks and Scorcese discovered in the late '70s, served primarily as an introduction to the history of the draft riots. The writers borrowed only a few particularly pungent gang names (including the Dead Rabbits and the Plug Uglies), the sketchy outlines of two key characters (Bill the Butcher and Monk McGinn), and Asbury's "great title" from the book. The rest, he says, was original, with guidance from about 50 historical sources.
Of course, the decision isn't up to Jay Cocks. The writers branch of the Academy of Motion Picture Arts and Sciences determines which scripts count as an original screenplay and which count as an adapted screenplay. When making its decision, the committee considers the sources in question, interviews given about the movie, and the film's publicity materials. They also consider how the Writers Guild of America classified the film for its awards, although they sometimes make a different call. (The WGA also classified Gangs as an original work.)
Miramax says the same:
The adaptation was so loosely based on the book, however, the script was considered for 'Best Original Screenplay' at the 2002 Oscars instead of 'Best Adapted Screenplay'. [...] Scorsese's first cut of Gangs was over four hours long. He's the first to admit that his broad adaptation and final cut did not cover all of the events of the time and said, "this is based on history, there's no doubt about it. But it is still a film that is more of an opera than history."
Scorsese's characters were either entirely fictional, like Jenny Everdeen played by Cameron Diaz, Amsterdam Vallon played by Leonardo DiCaprio and Priest Vallon played by Liam Neeson or they were fictionalized versions of real people like Bill 'The Butcher' Cutting played by Daniel Day-Lewis.