There was a time in this country when “class warfare” was more than an epithet politicians hurled at each other. That is one reason the Everett Mills was a place where Democratic U.S. Senate candidate Elizabeth Warren had no trouble bringing a crowd to its feet.

She was standing Friday morning on the site where, 100 years ago, immigrant textile workers launched a bloody two-month walkout that became famous as the Bread and Roses strike. Middle-class Americans again have had enough, Warren said, with a system that in the 21st century is stacked against them in favor of Wall Street and its political allies.

“They attacked collective bargaining. Over 30 years, they’ve attacked pensions. They’ve attacked wages. They’ve attacked health care. They have attacked unions. They have attacked working families, and now we find ourselves in a very different world,” the Harvard law professor and consumer advocate told about 120 people at a Merrimack Valley AFL-CIO breakfast. “ We find ourselves in a world when we are recovering from the biggest financial crisis since the Great Depression, and yet those who brought us the crisis have not been held accountable.”

That kind of us-vs.-them passion quickens the pulse and opens the checkbooks of liberals around the country. Massachusetts has become their marquee Senate race of 2012, a referendum on the state of liberalism itself. Many on the left, disillusioned and disappointed with the Obama administration, have turned to Warren as their new champion.

Now Warren is trying to win over a broader audience, particularly those registered as independents, who make up more than half the electorate in Massachusetts, and more conservative Democrats, who her critics say may be turned off by her stridence.

A hard-fought race

Republicans have just as much at stake in Massachusetts. They are struggling to hold on to a seat that for decades was held by a liberal lion, Edward M. Kennedy — until an appealing but unknown GOP state senator named Scott Brown surprisingly won in a January 2010 special election after Kennedy’s death.

Independent voters went for Brown by a ratio of better than 2-to-1. To be reelected, GOP strategists say, Brown will have to win them again by a double-digit margin and pick up the votes of about one in five Democrats, presumably more conservative blue-collar ones in places such as South Boston.

Unlike the special election, which took place in the dead of winter, this is a presidential year. Stalwart Democrats are likely to come out heavily to vote for President Obama at the top of the ticket.

And Massachusetts Democratic Party Chairman John E. Walsh promises that “we’re not asleep at the switch, like we were” in 2010, when the party didn’t see Brown’s surge against the Democratic candidate, state Attorney General Martha Coakley, until it was too late.

Warren’s campaign has also stepped up its grass-roots operation. On Wednesday night, more than two dozen volunteers ate potluck fare and worked the phones at her headquarters in a nondescript office building alongside a freeway in Somerville. A tote board on the wall noted they had made 14,918 calls and identified 1,315 supporters in April.

Warren is not yet officially the Democratic nominee — that will be decided in a September primary — but the party establishment has lined up behind her.

Her gender is also likely to be a factor in a state that has never elected a female senator and has sent only four women to the U.S. House, but where female voters make up about 53 percent of the electorate.

Polls show the race is close, but the dynamic could shift in either direction, in no small part because Warren is a first-time candidate who has yet to introduce herself to many in this state.

Where a Suffolk University poll in February showed her trailing Brown by nine percentage points, “what we calculated was the difference was people who do not know her,” said David Paleologos, director of the university’s political research center.

Touting work with Obama

Warren, who raised twice as much as Brown did in the first quarter, will have plenty of money at her disposal to rectify that. She has begun a $1.6 million television ad campaign that features her work with Obama on the creation of the new federal Consumer Financial Protection Bureau. Liberals had hoped she would serve as the first head of the bureau, but the administration opted for a less controversial figure, Richard Cordray.

In her stump speeches, Warren reminds voters of a background that began far from Harvard Law School. She grew up in Oklahoma, the whip-smart daughter of a cash-strapped maintenance man and a mother who worked answering phones at Sears.

Whether that will sell against Republican efforts to define her as a Harvard elitist and an anti-business extremist, however, remains to be seen.

As Warren last week toured Lowell — in a part of the state that voted for Brown in 2010 — she made a point of dropping by locally owned Enterprise Bank, where she told chief executive Jack Clancy Jr., “If the Wall Street banks had behaved the way the community banks had behaved, we would not be in this crisis.”

But at a small-business roundtable at Salem State University, some were skeptical of her insistence that raising taxes on the wealthy and on oil companies would be enough to fund the investments she says are needed in infrastructure and education.

After meeting with her, Mario Ricciardelli, founder of a start-up company called HipHost, criticized her for “inflammatory sound bites” that “vilify big businesses that make money.” Still, Ricciardelli — who described himself as “fiercely independent, because both parties have severely disappointed me” — said he is not sure how he will vote this fall.

A stumble on ancestry

Some veteran Democratic strategists acknowledge privately that they are concerned at how Warren reacted to her first major controversy, the revelation by the Boston Herald that she had claimed Native American ancestry based on what appears to be one-32nd of her lineage. That raised questions about whether she had used it to her advantage in receiving prestigious faculty appointments, though Harvard officials deny it and Warren said, “I’ve got what I’ve got because of what I’ve done.”

By November, voters may well have dismissed it as a minor flap. But the fact that the story is still being talked about more than a week after it broke (it was on the front page of Saturday’s Boston Globe) reflects Warren’s clumsiness in handling it. She claimed, for instance, that she had listed herself as Native American in a legal directory for nearly a decade because she wanted to “meet others like me.”

It also overshadowed embarrassing developments for Brown, including his acknowledgment that even though he opposed the new health-care law, he takes advantage of a provision in it to put his adult daughter on the family’s insurance policy.

Brown moves to the middle

Meanwhile, Brown tells his own hardscrabble everyman story. His parents each married four times, and his mother was briefly on welfare. As a troubled teen who had suffered physical and sexual abuse, he recalls, he turned his life around when a judge gave him a second chance after he was arrested. As he did the first time he won, Brown campaigns in a pickup truck that he says now registers more than 231,000 miles on the odometer.

But where Brown campaigned in 2010 to be “the 41st senator” — the one who would give the Republicans the power to mount filibusters to block the Obama agenda — he now cites his credentials as one of the few GOP senators who can work across the aisle. In his speeches, he frequently mentions Democratic senators with whom he has collaborated on legislation, and he boasts the endorsements of former and current Democratic officials, including Ray Flynn, a onetime mayor of Boston who also backed him two years ago.

Brown’s strategists note that the new consumer bureau that Warren conceived would never have become law had Brown and two other Republicans not crossed party lines to support it.

Brown has also worked hard at keeping in touch with the state. When he appeared at a Veterans of Foreign Wars post in Haverhill last week, widow Helen Wall marveled that his office had answered her letter regarding her late husband’s Medicare claims in less than a week.

“He’s a person-to-person politician,” said Suffolk University’s Paleologos. “He knows where every pothole is and how to fix it.”

Warren and her fellow Democrats hope to shatter that image. They point out that Brown voted with his party against extending unemployment compensation and in opposing tax increases for the wealthy.

“That fine, decent, great dad and husband is not a friend of working people, and we must expose him for that,” Massachusetts AFL-CIO President Steve Tolman said as he introduced Warren in Lawrence.

Warren said in an interview that “running for office for me is an act of optimism. . . . It is possible to build a future for our children. I can see it. I can almost taste it.” What no one can doubt is that she is also ready to fight for it.