The gang melees depicted in Gangs of New York are drawn pretty much wholesale from its source material, Herbert Asbury's The Gangs of New York: An Informal History of the Underworld. Some of the featured figures (Hellcat Maggie, Bill the Butcher and his peers, etc.) are taken from the book's account. The bare bones of gang conflict in this era depicted in the book and film, like fights breaking out at the theater and the struggles between rival firefighting companies, are borne out by historical fact. But the idea of massive pitched battles between martial gangs are an invention of the author. (Other aspects specific to the film are definitely invented -- Five Points was filthy and rough, but not the state of domestic squalor the film depicts, some of the geographic specifics of the film's architecture are invented, and the depiction of Chinese-Americans and opium dens is completely off for the late 1850s and early 1860s.) Five Points gangs were organized and pugnacious, but fights were more over the political operations of these gangs than simply over turf or ethnic supremacy. In addition, the film emphasizes the conflict between Protestant Nativist and Irish Catholic immigrant gangs, but the bulk of gang conflicts within Five Points were between Irish Catholics. Scorsese almost certainly knows this and employed creative license with those aspects -- he uses the depiction of gang warfare in the film as a commentary on later American organized crime and the racial violence of the Draft Week riots, and Scorsese uses the draft riots as a commentary on 20th century race riots -- but the film's epic battle sequences aren't representative of the actual time period.
Archaeologist Rebecca Yamin talks about the film's creative license with material culture and living conditions here. Timothy J. Gilfoyle's review of the film for the Journal of Urban History unpacks some of its artistic licenses.