ANNE GUST’S FOREBEARS, in the middle of the 20th century, were nearly as eminent in Michigan as the Browns were in California. Anne’s maternal grandfather, Howard Baldwin, was a close friend and adviser to Sebastian S. Kresge, who had founded the retail chain that later became Kmart. Her paternal grandfather, Rockwell T. Gust, was a partner at Butzel, Eaman, Long, Gust & Kennedy, a law firm that represented the world’s biggest auto companies.

Anne Gust Brown on her father’s lap at home in Bloomfield Hills, Michigan

With her brother Billy in 1965

Anne’s father was also named Rockwell, but people called him Rocky. He was a lawyer, too, working for a time at his father’s firm. But while Rockwell was an intimidating, much-admired lawyer, Rocky was best known as a bon vivant with vague political aspirations. Gust Brown often mentions her father’s political career — in particular, a run for lieutenant governor in 1962, the year that George Romney, Mitt’s father, was elected governor. But Rocky lost badly in the primaries, and friends say no one had expected him to win in the first place. Nor did his legal career take off. “He was very personable, a great conversationalist, a good sense of humor. He was the kind of guy who everybody liked,” says William Saxton, a former CEO of the firm, which is now known as Butzel Long. “But he wasn’t much of a lawyer. He liked to drink and liked to party.”

Born in 1958, Anne was raised in Bloomfield Hills, an upscale Detroit suburb, in a home she has described as being filled with “a big, boisterous” crowd. She was the fourth of five siblings; when she was 12, two cousins moved in after their parents died. According to Anne, her mother didn’t coddle. In a 2013 interview, she recalled, “When I was really young — 4 or something — I go up and go, ‘Mom, Bob punched me,’ and she goes, ‘Oh, stop being a whiner.’” Anne’s parents divorced when she was entering high school. They didn’t encourage her to study hard, she says. Her father was focused on the boys, and her mother didn’t much care about academics. Still, Anne graduated as one of three valedictorians. Her mother had taken her to visit some colleges in the Northeast, but she decided to head west instead.

In the fall of 1976, when Anne Gust arrived at Stanford, Jerry Brown had been governor for less than two years but already had an outsize reputation as an eccentric ex-­seminarian who refused to ride in state limos. Earlier that year he had made a bid for president, during which the newspaper columnist Mike Royko had written that Brown was attracting the hippie-dippy “moonbeam vote.” That evolved into the nickname “Governor Moonbeam,” which stuck. Within California, many felt his presidential aspirations were distracting him from state business. During his two terms, he notched some significant achievements, including a landmark law that gave collective-bargaining rights to farm workers, but he also made some high-profile errors. He amassed a big budget surplus that made it easier for anti-tax activists to secure the passage of Proposition 13, a ballot measure that significantly limited property taxes and had long-lasting ramifications for the state’s finances, and voters recalled three of his nominees to the state Supreme Court. “I think when he was in Sacramento and focusing on his job as governor,” says Gray Davis, his chief of staff at the time, “he got a lot done. It’s just that competing for his attention in Sacramento was four campaigns” — two bids for president and one for Senate, along with one for governor.

Gust Brown told me that she didn’t pay much attention to any of that while at Stanford. “I don’t have a lot of memories at all of Jerry from that time,” she said. “Much to his chagrin.” Although she majored in political science and volunteered on Republican-turned-Independent John B. Anderson’s 1980 presidential campaign, she wasn’t active in Stanford’s civic scene. Her friends thought of her as fun, confident, and quietly brilliant. “We called her a closet red-hot,” says Carol Bounds, her roommate throughout college. “No one knew how smart she was till grades came out. Then the really nerdy guys would be like, ‘What? Anne?’”

In 1980, Brown was a year into his second term when Gust moved back to Michigan to attend the University of Michigan Law School. Her colleagues there remember her as her Stanford friends do — as both fun-loving and smart. Much of Gust’s family remained in Michigan, but she was, by then, sold on California. In 1983, after graduating magna cum laude, she returned — to San Francisco, where she quickly established herself in influential legal circles, working as a litigator at one major firm and then another. She grew tired of litigation, though, and in 1991 took a position as an in-house counsel at the Gap.

At the time, Gust was living near Brown in San Francisco’s Pacific Heights neighborhood. Mutual friends had introduced them. Brown was chair of the California Democratic Party and needed representation in a lawsuit that had been brought against the party; Gust defended him for free, and they started dating. From the outside, they were not an obvious romantic pairing. Gust was in her early 30s and at the beginning of her career, and Brown was in his early 50s with much of his career behind him; Gust was genial, while Brown could be inscrutable; Gust was a pragmatist and Brown a dreamer; Gust had been in a couple of relationships but had been largely focused on work, while Brown had a reputation as a serial dater. Also, Gust had been raised Republican.

With Jerry in the early 1990s

With her father on her wedding day, June 18, 2005

With Jerry and Sutter at the Brown family ranch in Colusa County, California

Kathleen Brown, Jerry’s sister, recalls meeting Gust for the first time in the early 1990s, after a fundraiser in San Francisco. “After the dinner, Jerry and I were going to go get a drink or something, and I said, ‘Should we get a cab or what?’ and he said, ‘Oh, no, no, I’ve got somebody. She’ll come and get me.’” That somebody was Gust. “She was this very buttoned-down, sort of Burberry London trench-coat-wearing attorney, and she was so different from most of the women that Jerry had dated.” Yet they got along well because both felt they had met their intellectual match — Brown told me that he found Gust “lively and direct and engaging” — and their relationship deepened.

In 1992, Brown made another bid for president — his third — against a crowded field of Democrats, including Bill Clinton. Gust registered as a Democrat so that she could vote for him in the California primary, but she was also occupied with her legal career, and, for several years, their relationship remained casual. “Anne never was one of these women who was like, ‘I’ve got to get married,’” Lauri Shanahan, a close friend and a former colleague at the Gap, says. “She adored him, but the world did not revolve around him at all.”

Gust loved working at the Gap. She was soon promoted to general counsel and, within less than a decade, became chief administrative officer, a senior position reporting directly to the CEO . Her rise coincided with the Gap’s expansion from a niche retailer to a global brand, but the growth came with difficulties. By the late 1990s, the company had begun to face a backlash over poor conditions in the overseas factories that produced its clothing. The situation seemed intractable: Enforcing higher standards could hurt the Gap’s bottom line, but ignoring the problem could mean a public-relations disaster, not to mention an ethical one. The company’s legal and compliance departments reported to Gust; she was responsible for finding a solution. “In those early years, there wasn’t a week that went by that we didn’t have activists protesting at some Gap store somewhere,” says Alan Marks, who was the vice president of corporate communications at the Gap during this period. “All of that ultimately fell at Anne’s doorstep.”

Gust set out to tighten the Gap’s standards and enforcement mechanisms. She also argued to the CEO and board that disclosing what the Gap had found at its suppliers’ factories might, counterintuitively, be good for the company. In 2004, the Gap published a 40-page report acknowledging that workers had faced verbal abuse, safety problems, and other issues at a number of its suppliers’ factories. As Gust had hoped, the report earned the company praise for its transparency. What’s more, the Gap had stopped working with suppliers that had repeatedly fallen short of its standards. Rival retailers, which faced similar criticism, were forced to follow suit. The supply-chain overhaul was the most significant accomplishment of Gust’s career at the Gap.

By then, Gust and Brown were living together in Oakland, where he was mayor. Over the years, their relationship had become much more serious. Shanahan says, “I remember wondering to myself, early on, Does he appreciate her enough? Then, at some point, I just remember this epiphany of, Oh my God, he adores her.” Kathleen Brown recalls when her brother began bringing Anne on family vacations. “I thought, Whoa! This is new. And my mother and father — my mother in particular — loved her. Anne has such a down-to-earth personality and is genuinely interested in people, and not in a political-campaign sort of way. She’s just accessible and easy to be with.” Bernice, Jerry’s mother, often prodded her son and his girlfriend to get married. “She would always whisper to Anne, ‘Come over here, I want to tell you something,’” Kathleen says. Bernice died in 2002. Three years later, on Gust’s 47th birthday, March 15, 2005, Brown cooked her dinner and proposed, after 15 years together, that they get married.

In June, Senator Dianne Feinstein, a close friend, officiated the wedding, which marked not only a personal turning point for Gust Brown but also a professional one. Around the same time, Brown asked her to help him run for attorney general. At first, the suggestion startled her. She had no expertise in politics, and friends expressed reservations about her working so closely with her husband. She later recalled, “Every person who advised us on this said, ‘This is just crazy. … The only person you can blame every day is the campaign manager, and then she’s going to be sleeping next to you, and this is not a good idea.’”

But Brown insisted. She was, he argued, smarter than most of the people who passed for experts in Sacramento. Also, he needed a campaign manager whom he could trust. “I obviously only cared about Jerry,” she said. “It wasn’t about me or a future career I was going to have in consulting.” In 2005, Gust Brown left the Gap and a salary of $600,000 to run her husband’s campaign for no pay. “I don’t think I spent a whole lot of time thinking about it,” Gust Brown recently told me. “I think I said, ‘Yeah! Sure! That sounds fun!’ It worked out even better than I’d thought.”