The HBO period drama sets invented melodrama within actual historical story lines. Here are the back stories of elements that shape the world of the series.A scene in this week’s episode of “The Gilded Age,” Julian Fellowes’s frothy period drama on HBO, takes us to Central Park in the late 19th century. Marian Brook (Louisa Jacobson), young, rebellious and newly arrived from the obscurity of Pennsylvania, is riding in a carriage with her two blue-blood aunts when talk turns to the subject of Caroline Astor, the fearsome doyenne of New York society.“Do you like Mrs. Astor?” Marian asks.“That’s like saying, ‘Do you like rain?’” her Aunt Agnes (a waspish Christine Baranski) replies. “She is a fact of life that we must live with.”It is one of many nods to New York history that appears in “The Gilded Age.” Set during a time of dramatic change, the series chronicles a moment when the city’s center of gravity moved uptown, when society’s rules were rewritten as swiftly as new European-inspired mansions sprung up along Fifth Avenue, and when old families like the Astors and the Schermerhorns were challenged socially and financially by arrivistes named Vanderbilt, Gould and Rockefeller.The era’s name, from a book co-written by Mark Twain, makes the point that the glitter was on the surface. “Gilded means gold-covered, not golden,” said Erica Armstrong Dunbar, a history professor at Rutgers University who was the main historical consultant for “The Gilded Age,” and a co-executive producer. “It was a time when economic inequality, racial segregation, violence and nativism was living side by side with luxury and opulence.”Carl Raymond, a social historian whose podcast, “The Gilded Gentleman,” focuses on the era, said the cultural shifts were driven largely by “huge changes in commercial infrastructure, when crazy money was pouring in and old New York was being challenged by new.”“It’s when the new society was being created and everybody was jockeying for power,” he said.The HBO series speaks mostly to the Gilded Age of our imagination, full of grand families, sumptuous furnishings, lavish entertainments, stringent social rules, massive fortunes and sky’s-the-limit ambitions.Roughly halfway through its first season, which ends on March 21, “The Gilded Age” has blended fictional melodrama with actual historical story lines, like the importance of the Black press, the influx of stratospherically wealthy railroad magnates into the city and a simmering society dispute over the fashionable opera house’s inhospitality to newcomers.The events have played out among some characters who were wholly invented and others who were clearly inspired by real people — Carrie Coon’s striving Bertha Russell, for instance, channels the similarly eyes-on-the-prize Alva Vanderbilt — as well as a few who are portrayals of actual historical figures. These include the aforementioned Caroline Astor (Donna Murphy), the queen of Gilded Age society; Ward McAllister (Nathan Lane), snobby social arbiter to the elite; Clara Barton (Linda Emond), the founder of the American Red Cross; and T. Thomas Fortune (Sullivan Jones), the Black writer, orator, civil rights leader and newspaper editor.Teasing out the real from the fictional is part of the fun of watching “The Gilded Age,” which was recently renewed for a second season. To help you along, here are the back stories of some of the elements that shape the world of the series.Denée Benton plays a reporter who writes for T. Thomas Fortune, a pioneering Black newspaper editor.Alison Cohen Rosa/HBOUptown vs. DowntownIn the first episode, the chef who works for the rapaciously ambitious new-money Russell family notes approvingly that the family has moved to stylish 61st Street, some 30 blocks north of their previous house. “Thirtieth Street is out of fashion,” he declares.Indeed, the early history of upper-class Manhattan is the history of northerly migration, from Bowling Green to Washington Square to Murray Hill to the 50s, and then straight up Fifth Avenue by the 1880s.“All of a sudden people you think are beneath you, people you didn’t want to associate with, are suddenly on your block,” said Esther Crain, author of “The Gilded Age in New York” and founder of the website Ephemeral New York, which explores interesting aspects of the city.She described it as a time when corruption, exploitation and graft were rampant, but also when the culture, lifestyle and institutions of the city began to take shape, cementing New York’s sense of itself as the center of everything.“New York was the microcosm of the era — the financial capital of the country, the industrial base for lots of big business,” she said. “It had the culture, the capital, the theater and shopping and fashion, and everybody who was anybody wanted to be here.”The Opera“The Age of Innocence,” Edith Wharton’s exquisite dissection of Gilded Age New York, opens with the main characters preparing to see “Faust” at the Academy of Music, the opera venue beloved by New York’s old guard. “Conservatives cherished it for being small and inconvenient, and thus keeping out the ‘new people’ whom New York was beginning to dread and yet be drawn to,” Wharton writes.Indeed, although Bertha Russell, the richest and most brazen upstart in “The Gilded Age,” attends the opera as a guest, she discovers to her dismay that all her wealth can’t buy her a coveted private box. The Academy had fewer than two dozen, owned by prominent New York families and passed to their heirs.Bertha Russell, a wealthy arriviste played by Carrie Coon, resembles the similarly steely Alva Vanderbilt. Alison Cohen Rosa/HBO“Going to the opera in this period was a social battlefield,” Raymond said. “It was about where you sat, what you were wearing — and most importantly, who saw you do it.” The layout lent itself to social peacocking, he said, with “boxes on one side of the stage looking at boxes on the other side.”In New York, rich people annoyed at being excluded from things tend to set up their own fancier alternatives. In this case, a group of new-money interlopers pooled their money and built a bigger and better building. (A character in “The Gilded Age” describes them as “J.P. Morgan, the Rockefellers, the Vanderbilts — every opportunist in New York.”) The result, the first Metropolitan Opera House, opened in 1883 at Broadway and 39th Street. (Unable to compete, the Academy tried to reinvent itself as a vaudeville hall but closed several years later.)Dunbar said that the ease with which the rich could buy their way into society during the period reflected and bolstered one of the founding myths of America: that it was a place where anything was possible, as long as you did the work and made the money.“It may seem like this is just a case of ‘old’ rich people and ‘new’ rich people fighting, and who cares,” Dunbar said. “But it speaks to the changing of the guard, and the changing of traditions, and the way this nation has always grappled with change.”European SocietyAmerica was still a young country during the Gilded Age, barely 100 years old and forged by revolution that ostensibly repudiated the old ways. But for all that, Manhattan’s upper crust seemed determined to emulate European customs.In “The Gilded Age,” Mrs. Russell reflects the tastes of the time by boasting that her new chef is French. Her extravagant new home was designed to emulate grand European houses, as were the mansions built by real-life New York arrivistes of the era. (The interiors also were generally full of materials bought from European chateaus and imported at huge expense.) The new opera house was modeled on its European counterparts. Social customs, too — the elaborate codes of dress, manners and decorum, dictating who could be introduced to whom — were also very European, perhaps as a response by a nervous upper class to the exciting but threatening notion of American social mobility.“Caroline Astor’s model was Europe; she wanted to create a European American court,” Raymond said. “One of the funniest ironies about the Gilded Age is that you have a society desperately trying to emulate the courts of Europe and British aristocracy.”Caroline Astor, as depicted by the society portraitist Carolus-Duran. Mrs. Astor ruled New York society in the late 19th century.Sepia Times/Universal Images Group, via Getty ImagesMrs. Astor vs. Mrs. VanderbiltFor many years, Caroline Schermerhorn Astor was the ruler of New York society and the epitome of old-guard Manhattan. With the help of her friend Ward McAllister, she decreed who and what was worthy, or not. It was said that her parties were limited to 400 guests from just 25 “old” families.But she met her match in the staggeringly rich Alva Vanderbilt, who swept into New York and in 1882 installed herself in the most over-the-top new mansion the city had ever seen, at 52nd Street and Fifth Avenue. Designed under Vanderbilt’s watchful eye by the renowned architect Richard Morris Hunt and known as the “Petit Chateau,” it was enormous, made of limestone and done in a French Renaissance and Gothic style. It indeed looked like a castle, to the extent you can have a castle in the middle of an American city. Astor herself had two houses, one in the increasingly unfashionable 30s and one in the 50s. But neither was as nice as the Vanderbilt mansion.In 1883, Vanderbilt threw a lavish masked ball for more than 1,000 guests. Everyone clamored to be invited, but Astor and her daughter Carrie (who was said to be desperate to attend) were left off the guest list. The story goes that after Vanderbilt pointed out to McAllister that she had never been introduced to Astor, Astor promptly called on Vanderbilt — and swiftly received an invitation to the party.Alas, like virtually all the Gilded Age mansions, the Vanderbilts’ “Petit Chateau” eventually became too expensive for the family to maintain. In 1926, Vanderbilt heirs sold it to developers for $3.75 million, and it was destroyed. An office building now sits on the site. More