In her booming middle-class suburb north of Detroit, the woman who will soon become GM's CEO remembers pining as a 10-year-old for her cousin's red Camaro convertible and tinkering in the garage with her father, a die maker who spent four decades at GM.
In 33 years at GM, Barra has worked in engineering, communications and human resources. She's gained in-depth knowledge of a company whose complexity contributed to its losing ground to rivals and, four years ago, a trip through bankruptcy court. In each stop, Barra analyzed the situation and simplified things. For instance, she streamlined designs by using the same parts in many different models.
One of her professors at General Motors Institute, now Kettering University, saw evidence of her managerial abilities early on.
''She was great in getting jobs done, putting a team together and making sure that it's being done right,'' Mo Torfeh says. ''She was always the person who took charge.''
Now it's up to Barra - the first woman to lead a global automaker - to ensure GM prospers for a new generation of 212,000 employees spread over 23 time zones. GM's board unanimously approved her for the post two weeks ago after CEO Dan Akerson announced he would step down to help his wife battle cancer.
Barra, 52, inherits a company that's putting out strong new products and making money. Since leaving bankruptcy in 2009, GM has racked up almost $20 billion in profits. But it also faces intense competition in its home market and challenges in Europe and other regions.
Friends and colleagues say Barra has an unusual mix of skills. She's fiercely intelligent yet humble and approachable. She's collaborative but is often the person who takes charge. And she's not afraid to make changes.
''When you put her in a position that's completely new to her, she does an amazing job of getting grounded, understanding what's important and what's not and executing very well,'' said Gary Cowger, a former GM executive who mentored Barra.
Barra, who declined to be interviewed for this story, has said she had an early aptitude for math and science. Her mother, one of eight children who never attended college, encouraged Barra and made higher education a priority for her and her brother.
''She was so supportive, not saying `You have to do this or that,' but whatever you do, put your heart in it,'' Barra said at Inforum, a professional development group for women, at an event in Detroit last year.
Barra joined GM at 18. She was a co-op student, working for several months at a time at GM's Pontiac division while studying for her engineering degree at General Motors Institute, a Flint, Michigan, college then owned by the company.
In a lab where students worked in teams to build electric motor controls, Barra showed natural management skills not often found in engineers, said Torfeh, the veteran professor who instructed Barra in at least two classes.
Barra was near the top of her class, but wasn't the smartest engineer. Her people skills, however, were so strong that Torfeh thought at the time Barra would rise high in the male-dominated auto business.
Through the years, Barra stayed in touch with Torfeh. Last June, when she spoke at Kettering's commencement, Barra took time to congratulate Torfeh and his daughter, who was graduating that day.
GMI was the training ground for many female executives in the auto industry, including Diana Tremblay, a GM vice president, and Carla Bailo, head of Nissan Motor Co.'s research in the Americas.
Bailo, who graduated a year before Barra and serves with her on Kettering's board, said it's understandable how many of the women who started in the male-dominated 1980s became leaders.
''If you had the guts and gumption to stick that out, to say, `This is a man's world and I need to blend in,' that makes us some of the most adaptive people in the industry,'' she said.
Barra graduated from GMI in 1985, and GM eventually sent her to Stanford University to earn an MBA. When she returned, she rotated through a number of jobs, including executive assistant to then-CEO Jack Smith, a role often given to rising stars. She headed midsize car engineering and managed GM's Detroit-Hamtramck plant.
Just after the 2009 bankruptcy, then-CEO Ed Whitacre put her in charge of human resources, a stop that isn't normally along the CEO track. But in Barra's case HR was key. GM had to keep talented people from jumping ship so it had bench strength to recover. Few people left.
In 2011, Akerson plucked Barra from HR to run GM's huge worldwide product development, an operation he says was in chaos at the time.
Through all the moves, Barra did the same thing she did in college - took charge and got people to work as a team, said Grace Lieblein, GM's vice president of purchasing and a close friend of Barra's.
''It's almost always Mary who stands up and says she'll take that on,'' Lieblein says.
One recent problem she took on was the Chevrolet Malibu, a midsize car with roots back to GM's pre-bankruptcy era. GM rushed an updated version to market in 2012. The car looked dull and sold poorly. Barra and her team made fixes in under a year, something unheard of at GM. The new version reached showrooms in the fall and sales are up.
Barra does have holes in her resume. She has little experience in sales and marketing or accounting, two key areas that she'll have to rely on others to manage.
But Whitacre said she'll overcome any knowledge gaps. ''What she doesn't know she'll pick up quite quickly,'' he says.
Barra made $4.85 million last year, including a $750,000 base salary plus stock units. The pay for her new job hasn't been determined, but it's no longer capped by government pay restrictions.
Much has been made about Barra's gender. At the Inforum meeting last year, she stiffened when the issue came up.
''We all come to the table, we all work hard, we all bring out skills and that's the way I've always thought of it,'' she said. ''I never went and said, `That happened to me because I'm a woman.' Just don't go there.''
Barra believes in balancing work and family. She's been married for 27 years to Tony Barra, a technology consultant, and has two teenage children and a dog. She sometimes tells executives and engineers who are working late to go home.
Because her job spans so many time zones, there's much travel and days are long. She's on several corporate, nonprofit and university boards. She likes to go to dinner with friends, but after kid activities, there's little time left for her own hobbies.
''I don't have a lot of free time, but that's the life I've designed right now,'' she told Inforum.
When Akerson announced Barra's appointment as CEO in a broadcast to employees, many of them applauded spontaneously, Lieblein said. ''I just thought, `wow, that is so cool,''' Lieblein said. ''She cares about people and they know it.''