DETROIT — Her father was a die maker for 39 years, one of the legions of employees who performed the gritty tasks that made General Motors the nation’s largest and most powerful auto company.

And ever since she was a child, Mary T. Barra aspired to join the family business and make her mark in the rugged, automobile industry. At 18, she did just that, entering a G.M. technical school to become an engineer.

On Tuesday, Ms. Barra, 51, completed a remarkable personal odyssey when she was named as the next chief executive of G.M. — and the first woman to ascend to the top job at a major auto company.

While she is the consummate insider who has spent 33 years with G.M., Ms. Barra is now charged with driving change at the automaker, which, just four years ago, went bankrupt and needed a $49.5 billion government bailout to survive.