People are always more comfortable when surrounded by others like themselves. Throughout history, people have created smaller communities within larger communities. Sometimes they've been distinguished by class, color, or creed.
Regardless of how the community defines itself, it often physically distinguishes itself from the surrounding area in how it decorates its buildings, the clothes its citizens wear, the music they listen to, the language they speak... there are many ways for a neighborhood to appear distinct. That isn't necessary, though; it's possible to enter a section of a city that's culturally distinct that looks exactly like its surroundings. Harlem looks like any other area of Manhattan, whereas Miami's Little Havana is 85% Hispanic or Latino and is distinct from South Beach.
These neighborhoods aren't only found in cities; portions of rural landscapes can be considered part of a larger community, as with enclaves of Amish culture in the northern United States.
As a setting trope, this sort of thing can be used to flesh out and define the geography of a story. Some Sit Coms avert this, intentionally or not, by never showing the neighborhood the characters live in and letting them be as ethnically generic as possible. Sometimes this trope isn't invoked because the setting is less important than the characters and the action.
Taken to an extreme, these neighborhoods can become Decade Dissonance. On a much larger scale, you can get a Planet of Hats, when the same principle is applied to an entire species or world in a Sci-Fi setting. At its most basic, this gives us the Wrong Side of the Tracks, where there's a good side of town and a bad side of town. That would be a subtrope, as are your Friendly Local Chinatown, Gayborhood, and Fantastic Ghetto.
Be cautious about adding examples, and try to restrict them to neighborhoods, or regions within a nation. Entire nations can, and usually do, have distinct cultures from their neighbors, and that's not what we're going for here. A herd of unicorns ruling over the plains next to the forest, which is run by goblins, probably doesn't qualify. However, when those groups move to The City and start opening ethnic restaurants, they probably will.
Note: Just having a setting isn't enough to qualify for this trope, nor is moving between settings. They have to be different, they have to share a larger identity, and they have to be near one another. New York and Chicago don't count, Harlem and Greenwich Village do.
Gotham City has ethnic neighborhoods, to be certain, most notably a Chinatown that heavily featured in early stories.
The Time Scout series explores some of these in the East End of Victorian London. The books characterize the rapid shift in culture and wealth as Decade Dissonance, as the characters move from desperate poverty, to working class subsistence, to middle class ease, to Eastern European Jewish ghettos, and back, all in the space of a few miles.
Some of the action in World War Z takes place in distinct communities. In South Africa, some of it is in a desperately poor ghetto. These sorts of divisions tended to disappear after the apocalypse, though. We're all the same in the eyes of the dead, after all.
In C. J. Cherryh's Finity's End, different neighborhoods on the space stations could have wildly different reputations. Pell's White Docks were a poverty-stricken, crime-ridden ghetto, while green was middle class and blue upscale, for example. Even so, the stationers were considered relatively uniform compared to the bewildering complexity of Earth societies.
Tom Clancy's Without Remorse treats an urban ghetto as akin to a jungle environment. It notes that the neighborhood has undergone serious urban decay, formerly upscale homes are now home to criminals and poor working folk, when they're not simply abandoned. The bulk of the action takes place in that neighborhood, and John Kelly explicitly thinks of himself as crossing a border when he crosses the street and enters the neighborhood.
David Drake's The Lord of the Isles series takes place on a series of large islands, but some of those have cities, and those cities are described as having neighborhoods. Valles, the capital, has the palace district, of course, but some of the action of Servant of the Dragon takes place in the Bridge District, a working class neighborhood. It used to have a bridge. The queen's mansion was located in the rich district. Ilna's work on Erdin initially takes place in an upscale artisanal district, but she upgrades to a mansion in the wealthy district near the Earl's palace. Later, as The Atoner, she gets an apartment in a tenement in the poor Canal District.
The Empire Trilogy, part of The Riftwar Cycle by Raymond E. Feist and Janny Wurts, features large cities. Near sources of wealth and power, you find more wealth and power. Further away, you find poverty and despair. And everything in between. Near rivers you find industry and trade.
Robin Hobb uses these only when they're helpful. In his youth, FitzChivalry lived in the castle, but ran wild with kids on the docks. That sort of distinction disappeared when the Realm of the Elderlings switched its focus to nation-destroying troubles. However, this trope returned in force for the Liveship Traders trilogy, roughly half of which takes place in the city of Bingtown, where rich Traders live in the hills above the city, there's a wealthy artisanal district, a poorer area where the Three Ships Immigrants live, and the mysterious Rain Wild Traders community in the jungle. The cities of the Rain Wild have their own divisions, with poorer people living higher up the trees and wealthier Traders living closer to the ground.
George R. R. Martin's A Song of Ice and Fire has large cities with distinct neighborhoods, but we don't really get to see them, as his characters tend to spend an entire book sitting in a single room. Plus, a lot of the action occurs outside the cities. The best place for urban warfare is out in the country where there's room to maneuver.
A geographical oddity pops up in the Aubrey-Maturin series. Old cities can actually be an agglomeration of many smaller, older communities. London contains the remnants of many older communities that maintain a rather unique flavor. Sometimes, this leads to legal independence, as well as cultural. Aubrey finds relative security in a neighborhood whose laws make it safe for debtors such as himself to move about freely.
Similar to the Aubrey-Maturin example, Terry Pratchett's Discworld gives us Ankh-Morpork, based on Real LifeLondon. It's a city built on loam, but even more built on its own history. Each street is really a separate community. The Shades is a particularly notorious neighborhood. This really comes to the fore in Night Watch, when the revolution inspires everyone to hunker down and defend his own little neighborhood.
Harry Potter gives us, in addition to all the regular places in London, a magic London! It has places like Diagon Alley, where you can go magic shopping, and Knockturn Alley, where you can go magic shopping for magic bad things.
The works of Allen Steele tend to be set in the outer space frontier, where there's just not enough population for this to happen. However, when there is enough population, like on the Space Station over Earth, this trope rears its head and you get smaller communities within the larger one.
Unfortunately, the world of Memory, Sorrow, and Thorn goes to shit too quickly for his cities to really be anything other than empty shells, but even here he manages to throw in some communal differentiation. The city of Kwanupul, the only city we spend significant time in, has its more dangerous docks and its more sedate interior docks.
The City of Faerie is a Fantasy Counterpart Culture for a human city. It has its really wealthy interior district where all the money and power is, and it has exterior ghettos. Ethnic ghettos, with goblins living here, and kobolds living there (though never above ground floor; you know how kobolds are).
Otherland gives us a number of real cities with a number of real ghettos, including a number of historical cities recreated within the eponymous Otherland. It also gives us some unreal cities, with unique cultural divisions, as each "world" in the Otherland has roughly the same area as a burrough in New York.
The City & the City by China Miéville takes this Up to Eleven. The cities of Beszel and Ul Qoma occupy the same area, but are culturally very distinct and occupants of one of the cities are not allowed to interact with - or even take note of - anything in the other city.
In the novel A Grown up Kind of Pretty by Joshilyn Jackson, the young heroine, Mosey, tries to uncover her family secrets by visiting a hardscrabble, Trailer Trash area of her community that is made up entirely of the Duckins family, called "Ducktown."
The novel Alas, Babylon is set in the small town of Fort Repose in central Florida. As should be expected of a southern town in the mid-fifties, it's segregated into the poorest, ethnic area called Pineville, as opposed to River Road, the upscale white area where the protagonists live.
Live Action TV
On Buffy the Vampire Slayer, the Bronze (local hot spot) is located in the bad part of town, which is maybe a block away from the good part of town. More generally, Buffy's mother lives in a relatively upscale suburban neighborhood, and UC Sunnydale occupies a nebulous, geographically distinct location.
A great deal of Burn Notice's action occurs on South Beach, a ritzy, upscale commercial region, but sometimes the show finds its way to areas like Little Havana, which is mostly Cubano, or industrial districts.
Community's Annie Edison lives in a terrible ghetto, above sex toy store Dildopolis.
The cast of Friends lived in Greenwich Village, a neighborhood that has always been trendy and gentrified, though its had its good decades and bad.
Arrested Development gives us Wee Britain, an I Am Very British ghetto in California where people bribe each other in pounds, read cricket-themed pornography and enjoy a Mary Poppins puppet on a zipwire.
Law & Order was set in Manhattan and visited a number of well known New York neighborhoods, like Harlem, and Spanish Harlem, and maybe Harlem.
Arrow has the Glades, a section of city that's basically just a crime-ridden slum. It's the driver for most of the first season's plot.
Real life cities are notorious, famous, or infamous for their ghettos, barrios, and neighborhoods. Sometimes these are formed around a shared lifestyle, as in the bohemian nature of Greenwich Village; sometimes it's a racial identity, as with Harlem or Little Havana; sometimes its national background, as with Irish or Italian neighborhoods. Some of these neighborhoods can have good reputations, some bad. We don't judge.
Both New York and Boston have Little Italies. Additionally, a lot of working class neighborhoods in the Northeast can have a distinctly Italian flavor. Or Polish. Or Irish.
The neighborhood of Harlem predates its modern association with African Americans. It's gone boom and bust many times, with each typically coming with an ethnic or cultural shift. It's been a black neighborhood since the early twentieth century and was the locus of a renaissance of black culture in the thirties. The Apollo theater and Savoy ballroom are just two landmarks located in Harlem.
East Harlem is also known as Spanish Harlem. It contains the remnants of an Italian ghetto that used to dominate the area and, unfortunately, has some of the highest crime and poverty rates in the city.
Little Havana is a region of Miami dominated by Hispanics and Latinos, mostly Cubano, but with a number of Central Americans and other Caribbean islanders as well.
The city of Compton, part of the greater Los Angeles area, was a popular destination for African Americans after World War II. These days, it's notorious for gangs and gang violence, part of which was popularized in the 90s by NWA and Gangsta Rap.
The geography of China has largely defined its cultural contiguity. Northern China is home to an open, rolling plain and has been far more culturally united. Southern China is culturally distinct from the north, and its rugged, mountainous landscape has led to cultural fractionation there.
Moslem cities take this vary far. Often an individual cul-de-sac will belong to a given tribe or sub-tribe.
It is in general common in a Merchant City where visiting foreigners like sailors or caravaners, warehouse personal, brokers, clerks, and the like will live for years in such a neighborhood. This does not nescessarily imply hostile relations, but only that everybody prefers the arrangement.
As indicated in the opener, large swathes of the American Northeast are Amish country. For many people, it's just the joy of buying something handmade to give their home an antique-y look. For others it's the annoyance of getting stuck behind a horse-drawn cart on a country highway. For the Amish, it's living in the peaceful quiet of the 19th century.
Utah might as well have signs up saying "Welcome to Utah. It's Mormon here."
The areas of a video game city are mostly divided for gameplay reasons (maps can only be so big), but they also follow cultural divisions. There's a rich area, a poor area, the market, the docks, and so on.
Then there's the games where you're only in a small portion of a city because that part of the story's in a city and they don't give a damn about letting you explore, and that's called a Gateless Ghetto.
The Simpsons developed more of these the longer it went on. There's a Russian district, a Jewish neighbourhood, affluent Waverly Hills, and don't forget "Crackton"! Probably loads more.
Five hats means that five tropers think it is ready to publish.
You are saying that you think this draft is ready to be published. That means the description is not ambiguous,
it doesn't duplicate an existing trope, there are at least three examples, and the title makes sense.
Is that what you meant to do?
You are saying this draft has a ready-to-publish hat it does not deserve and you are taking it back.