Democrats have a problem and everyone knows it. President Obama calls it a “congenital disease.” If they can’t control it, Obama could spend the final years of his presidency battling not only a Republican House but also a Republican Senate.

Democrats don’t vote in midterm elections. That’s an exaggeration, of course, but the core of the Democratic coalition is made up of many people who turn out to vote only in presidential elections. The Republican coalition — older and whiter — suffers less from midterm falloff.

So much has been made of the building blocks the president assembled to win his two elections — the outpouring of voters younger than 30; the long lines at precincts in African American communities; the support he engendered among the rising Hispanic population; the growing support for him and Democrats generally among unmarried women.

But a Republican victory in a special congressional election in a winnable district in Florida last month has put many Democrats, including the president, on edge. “Our voters . . . get excited about general elections,” Obama said at a recent fundraiser in Houston. “They don’t get as excited about midterm elections.”

Obama hopes to stir his base to action and in the past two weeks has been trying to push all the buttons. He invoked the slaying of civil rights workers in the 1960s to implore a largely African American audience in New York to take advantage of their right to vote. At the White House a few days before that, he pushed the issue of pay equity for women. Around the country, he and other Democrats have seized on raising the minimum wage to draw a contrast with Republicans. He chastised House Republicans in a statement this past week for not moving on immigration reform.

View Graphic See how voter turnout waned across key demographic groups in 2010

But the president, hobbled by weak approval ratings, may be a drag on Democrats in some of the places his party will be fighting hardest this fall. And Republicans appear more motivated, spurred by their opposition to the Affordable Care Act.

Meanwhile, Democrats are banking on the belief that they can better identify potential supporters, motivate them and get them to the polls — in essence, reshape the midterm electorate to make it look more like the electorate in a presidential year. To try to do so, they will for the first time fully employ the sophisticated tools and techniques used in Obama’s presidential campaigns to aid Senate and some House candidates.

Republicans need to pick up a net of six seats to take control of the Senate. For Democrats, the most endangered seats are in Montana, South Dakota and West Virginia. Incumbents Kay Hagan in North Carolina, Mary Landrieu in Louisiana, Mark Pryor in Arkansas and Mark Begich in Alaska are in difficult campaigns, most in states Obama twice lost badly.

And Republicans see opportunities in Michigan, where Sen. Carl Levin (D) is retiring; in New Hampshire, now that Scott Brown, the former Massachusetts senator, has decided to take on Sen. Jeanne Shaheen (D); in Colorado, where Rep. Cory Gardner’s challenge to Sen. Mark Udall (D) has changed the race; and possibly in Iowa, where Rep. Bruce Braley (D) has stumbled in recent weeks in his Senate bid.

Democrats see opportunities to win two seats held by Republicans. One is in Kentucky, where Senate Minority Leader Mitch McConnell has a fight on his hands. The other is in the race for an open seat in Georgia.

The Democratic Senatorial Campaign Committee (DSCC) is assembling what Executive Director Guy Cecil said will be a $60 million effort — with the money coming from the DSCC, individual campaigns and other national and state party committees — in targeted races. Proportionately, the committee will spend more on field organizing and less on television than in the past.

The Republican National Committee, after concluding that the Obama campaign was miles ahead of the GOP, has worked to close the technological gap and will lead the party’s turnout efforts. The RNC will spend at least $56 million on its overall efforts (including the cost of upgrading technology), according to communications director Sean Spicer.

Mechanics alone will not cure the disease the president talked about. But in close elections, they can mean the difference between victory and defeat. Rep. Steve Israel (D-N.Y.), who chairs the Democratic Congressional Campaign Committee, acknowledged that in this midterm election, Democrats face an “indisputably difficult” environment.

“Our job is not to worry about the climate,” he said. “It’s to build out campaigns that can succeed in whatever climate we inherit.”

On the ground in N.C.

Preston Elliott was part of the team that helped Sen. Tim Johnson (D-S.D.) win reelection in 2002 by just 524 votes. In 2006, he served as field director for Sen. Jon Tester (D-Mont.), who won by 3,000 votes. Elliott was parked in Nevada in 2010, helping Senate Majority Leader Harry M. Reid (D) survive an all-out assault by Republicans.

These days, the bearded and balding Montana native works out of an office park in Greensboro, N.C., as the reelection campaign manager for Hagan. He said he was attracted to the challenge because it could determine whether Democrats hold the Senate.

“You want a race,” he said. “Even two years out, you could tell this was going to be a tough race in an off year.”

The president won North Carolina by just 14,000 votes in 2008, when Hagan ran 100,000 votes ahead of Obama. Mitt Romney beat Obama in 2012 by 92,000 votes, despite a massive Democratic effort that included holding the party’s national convention in Charlotte.

The state is now badly divided politically. Ferrel Guillory, a professor of journalism at the University of North Carolina, recently described his state as having a purple electorate and a red-state government — one that has moved sharply to the right since Republican Gov. Pat McCrory was elected in 2012.

Hagan is running this time without the benefit of Obama’s campaign but with the foundation he left behind. Her path to reelection will depend on her ability to do better among white voters than Obama — Romney won 68 percent of North Carolina whites in 2012 — and to try to keep the African American share of the electorate — exit polls say 23 percent, the Census Bureau says 26 percent — as close to 2012 levels as possible.

She must also capitalize on the split between longtime residents, who are solidly Republican, and recent arrivals. About 60 percent of those who had migrated to North Carolina in the previous decade backed Obama in 2012, Guillory said.

Hagan plans to run against the Republican-led legislature, which has supported several conservative pieces of legislation that sparked protests. The legislature’s actions will play an even more prominent role in the campaign if her GOP challenger turns out to be Thom Tillis, the speaker of the state House, who leads a crowded Republican primary field.

Hagan’s campaign is trying to build the capacity it will need later to identify, register, motivate and turn out supporters. The campaign is hiring and training the first of its field organizers, who will begin to recruit volunteers, who will in turn carry out voter registration efforts and do much of the door-to-door contact with targeted voters.

Meanwhile, Americans for Prosperity, funded by Charles and David Koch, has spent more than $6 million on ads attacking Hagan. Some Democrats worry that the DSCC is taking a huge risk by spending so much on its ground game while holding back money for television commercials.

“The problem, frankly, is how long they can leave these [candidates] out there getting pounded,” said one Democratic strategist, who declined to be identified to question the DSCC strategy.

The voters

Domonique Anderson is 23, works full time and is enrolled in a medical assisting curriculum at a technical college in Raleigh, N.C. She voted for the first time in 2008, and she voted again in 2012, both times for Obama. Asked if she cast a ballot in the midterm election of 2010, she said, “I’m pretty sure I didn’t.”

Her first vote was in Texas, where she was living as a high school student. Her grandparents were swept up in the historic nature of Obama’s campaign. “To go from [segregation] and think about voting for someone who was African American was just astonishing for them,” Anderson said by telephone.

She later moved to North Carolina and in 2012 cast her second vote for Obama. She was turned off by Mitt Romney’s comment about the 47 percent of Americans who he said expect government to take care of them. “I was offended by that,” she said. “I’m busting my butt out there.”

Anderson said she is often up at 3 a.m. to get to her job. After work there is school. When her grades slipped a bit — she said she was bothered when she began to get B’s instead of A’s — she quit a second job.

Anderson is aware of the upcoming Senate election and has heard some of the negative attack ads aimed at Hagan, but her busy life leaves little room for politics.

Carly Devries, also 23, lives in Michigan. A recent college graduate, she works for a state environmental agency. Like Anderson, she has only voted in presidential elections. What would motivate her to vote in November? “If there is some major issue or something . . . that would directly affect me or that I was really passionate about,” she said.

Devries considers herself a Democrat because she thinks some Republicans have views that “make me angry and are irrational and don’t follow my belief set.” But she likes Republican Gov. Rick Snyder, who is running for reelection this fall. “He doesn’t really have those kinds of extreme views,” she said.

Devries said she could vote for Snyder. But she was noncommittal about how — or whether — she would vote in an open Senate race. “I do care about issues that affect me personally, things I’m more passionate about,” she said, adding, “I don’t really get too involved.”

Stephon Anderson, who is not related to Domonique Anderson, also fits the profile of the voter who keeps Democratic strategists on edge. A North Carolinian, he is 22 and drives a forklift. When he voted for the first time in 2012, he said, he was not fully aware of the races beyond the presidential contest.

Asked how much he followed politics, he said in a telephone interview, “I can if I choose to, but I really don’t pay too much attention. You go on with things that are more important to you. I don’t see the effect on my life. I know overall it affects our country. But politics is kind of at the back of the list [after] bills, work schedule, what your kid needs.”

He is paying minimal attention now to the Senate race and wonders whether it’s even worth voting. “At the end of the day, it seems kind of like your vote doesn’t count,” he said.

Democrats must also win the battle for voters who split their tickets.

Nancy DeWitt, 64, lives in Baton Rouge and is a retired state worker. She said she votes in every election. She’s registered as a Democrat, but she voted twice against Obama, whom she doesn’t trust.

But she likes Landrieu. “She has always been accessible to the people here and has never walked away from any issues that we thought were important — and by we, I mean the people of Louisiana.” Still, she doesn’t particularly like Obamacare and knows that Landrieu has been a supporter of the law.

Landrieu’s ability to keep her distance from the president will be crucial in determining the outcome of the race there. At this point, DeWitt gives Landrieu the benefit of the doubt, noting that the senator had confronted the administration over aspects of the health-care law. “I think she’s doing what she was elected to do, which is to listen to the people who voted for her,” DeWitt said.

Laying the foundation

The groundwork for the Democrats’ get-out-the-vote operation began in earnest months ago in the offices of Civis Analytics, in a seventh-floor loft of an old office building in Chicago’s Greektown and in a townhouse near Washington’s Dupont Circle. Under contract to the DSCC, Civis Analytics started to model the electorates in states with the most competitive Senate races.

Civis is a descendant of Obama’s 2012 campaign. One of its founders is Dan Wagner, who began as a volunteer in the 2008 campaign and by 2012 was overseeing the sprawling data and analytics operation that helped guide many of the decisions in the campaign’s effort to find and turn out as many voters as possible.

“Campaigns do five things,” Wagner said. “They register people who like you; they turn out people who like you at higher rates; and they persuade people who don’t like you to get them to like you. Those are the three big things. Then to support those three things, they build a fundraising organization and then build a voter contact organization that makes all those things possible.”

Modeling produces indexes on a 1-100 scale for each voter. One index estimates how likely someone is to support a particular candidate; another measures how likely someone is to vote; the third projects how open to persuasion someone is. A campaign would target someone with a high support score and low turnout score but would not go after someone with a high turnout score but low support score.

The alchemy of voter turnout, especially in off-year elections, has been closely studied but not always understood by candidates. Many Democrats wrongly assumed that the techniques that worked for Obama in 2008 would work for them in 2010.

Jen O’Malley Dillon was Obama’s 2012 deputy campaign manager and has been at the forefront in developing the sophisticated practices that were the hallmark of the Obama campaign. A founder of Precision Strategies, she has been hired this year as a consultant to the DSCC to oversee its turnout operations in contested races.

“Nobody’s forgotten what happened in 2010,” Dillon said, referring to the shellacking the Democrats suffered. “That is an important framework to remember. They [DSCC] are putting in more focus and more time and more resources in building the ground operations and data and analytics in a way Senate races have never done before.”

At its core, what Democrats are trying to do is replicate the electorate that helped Obama win by maximizing turnout among young people, African Americans, Hispanics and unmarried women.

“Figuring out how to win is actually not the difficult part,” said Paul Dunn, the DSCC’s national field director. “It’s easy to do a model and put all the model into the calculators and it all spits it out. . . . The strategy isn’t the challenge. It’s enacting the strategy.”

The Virginia model

That is exactly the challenge that the campaign of Gov. Terry McAuliffe (D) faced last year in Virginia.

“When we did our very first poll and looked at what Terry’s chances of winning the election would be even against somebody as conservative as Ken Cuccinelli if the electorate looked exactly as it did in 2009, the conclusions were really daunting,” said Geoff Garin, the campaign’s pollster. “The imperative of trying to change the electorate was clear from the outset.”

The campaign conducted 10 focus groups with young voters, Hispanics, unmarried women, African Americans, white women and older white women to find out what messages would have the most impact with different groups of voters.

After completing the focus groups, the campaign polled targeted voters to gauge their knowledge of and interest in the gubernatorial election. That produced more discouraging results. Of those surveyed, 86 percent could correctly name the year of the next presidential election, 2016. But just 29 percent knew that the next governor’s race would be held in 2013.

Data supplied by BlueLabs, another analytics firm that includes veterans of Obama’s 2012 campaign, helped create a matrix that guided the campaign in its turnout efforts: estimated number of votes needed to win; numbers of new registrants needed to change the electorate; likely supporters with sporadic voting records; persuadable swing voters. That helped shape the size of the get-out-the-vote operation, from the number of volunteers the campaign needed to the location of offices.

Campaigns are now laboratories for experimentation, for testing theories and quickly analyzing the results.

David Nickerson, a political science professor at the University of Notre Dame who ran experiments for Obama’s 2012 campaign, said Democrats are at a disadvantage for two reasons. First, younger voters tend to be more mobile and harder to track. Second, many of those who vote in presidential elections pay little attention to politics. “There is an entire industry of generating interest in elections,” Nickerson said. “That industry is a whole lot louder in presidential elections than midterm elections.”

More than ever before, data drive campaign decisions. Michael Halle, who ran the field operation for McAuliffe’s campaign, offered one example. Researchers found that, in Virginia’s 2009 gubernatorial election, people who registered to vote between September and November were more likely to turn out than those who registered earlier in the year.

The Internet and social media represent one of the most important advances in how campaigns communicate with voters. Through them, campaigns can deliver tailored messages to people and also use a supporter to personally help persuade a friend to register or to vote.

But it takes more than knocking on doors or sending ­messages through Facebook. Campaigns must find the messages that resonate most with each voter. Often these days that’s a negative message. “While we always made the positive case for McAuliffe in our outreach, we did learn that you could in fact turn people out with negatives as well, as long as they seemed relevant to people’s own life,” Garin said.

The Democrats’ challenge

Republican strategists take a skeptical view in assessing what Democrats intend to do in states such as Arkansas, Louisiana, Alaska and North Carolina. Given that Obama lost all four in 2012 and generally has lower approval ratings in those states than nationally, Republicans say that Democrats need more than an energized base. They will have to appeal to voters who went for Romney in 2012.

“It’s difficult to think that’s something they are capable of doing,” said Brad Dayspring, communications director at the National Republican Senatorial Committee.

Democrats concede that turnout alone is not the key. They will try to define the Republican candidates in an unflattering light and hope that their own candidates have a more appealing style and message.

The other question is whether Democrats will truly have a better ground game. Since 2012, the RNC under chairman Reince Priebus has hired software engineers and other tech experts, while putting more emphasis on the same kinds of analytics and data mining the Obama campaign used.

The National Republican Congressional Committee set up a new internal strategy department focused on data and analytics, and the special election in Florida last month provided a test run for the coordinated efforts the party hopes to use in competitive districts.

At this point, 90 percent of the RNC’s political staff is deployed outside its Washington headquarters. The RNC’s Spicer said the party will have at least 300 paid staffers on the ground this year and probably more. Republicans also have identified an estimated 13,000 precinct captains around the country as they build for the fall and toward 2016. “This is the largest nonpresidential effort the party’s ever done,” Spicer said.

Whether Democrats can overcome the party’s historic disadvantage in midterm election turnout with more money and more sophisticated techniques is the critical question.

“If you can convince your base to behave like it’s a presidential election, it would be a game-changer for the Democrats,” said Notre Dame’s Nickerson. “But I don’t know how you do that. If anyone did, the Democrats would be far more successful than they are.”

Alice Crites, Peyton Craighill and Scott Clement contributed to this report.