It was not the most arresting of titles: in 1959 the African-American mathematician Katherine Johnson, who has died aged 101, completed a paper entitled Determination of Azimuth Angle at Burnout for Placing a Satellite Over a Selected Earth Position. Thus did she become the first woman to have a credit on a report published by the flight research division of the newly created National Aeronautics and Space Administration (Nasa).

Even more significantly, those calculations were at the basis of a crucial part of Johnson’s work for the astronaut John Glenn, when, in 1962, he became the first American to orbit the Earth. “Get the girl,” the astronaut had said, refusing to fly unless Johnson, with her mastery of mathematics, had verified the computer’s work on her mechanical calculating machine. “If she says they’re good, then I’m ready to go.” She did, and he flew.

Her contribution, wrote Margot Lee Shetterly in Hidden Figures (2016) – an authoritative account of Nasa’s black female mathematicians that was made into a film of the same name – was “the defining day of Johnson’s career”.

The focus of the US space programme in the 1960s was the race for the moon. Johnson was involved throughout. She played a key role in Alan Shepard’s 1961 Mercury mission, which put an American in space for the first time. Fifty-six years later, on the anniversary of that venture, the Katherine G Johnson Computational Research Facility was opened in Langley, Virginia. “Millions of people around the world watched Shepard’s flight,” said Clayton Turner, Langley’s deputy director, “but what they didn’t know at the time was that the calculations that got him into space and safely home were done by today’s guest of honour, Katherine Johnson.”

Barack Obama presenting Katherine Johnson with the presidential medal of freedom in 2015. Photograph: Carlos Barría/Reuters

Johnson was still calculating trajectories in July 1969 when Neil Armstrong and Buzz Aldrin made the first moon landing, and in 1970 when the Apollo 13 mission was aborted and nearly ended in disaster. “Everybody was concerned about them getting there,” she said in 2010. “We were concerned about them getting back.” She was later involved in the early years of the space shuttle, and the Earth Resources satellite.

Until recently the contribution made by Johnson and her fellow African-American colleagues to the US space programme went largely unheralded outside – and sometimes inside – Nasa. But Shetterly’s book, and the ensuing film, with Taraji P Henson in a starring role as Johnson, helped change that. Johnson was one of a group of remarkable women who fought every obstacle an entrenched deeply racist society could throw at them and, eventually, they won.

It was in 1943 that Langley, then part of Nasa’s predecessor, the National Advisory Committee for Aeronautics (NACA), hired its first five black female mathematicians. By 1949 Dorothy Vaughan had become the first African-American section head within the NACA, of the female-only, segregated West Area computing unit at Langley, which Johnson joined as a “computer” four years later. The West Area computers were subject to the racist Jim Crow laws, required in theory – but not always, for Johnson, in practice – to use separate offices, toilets and cafeterias from their white counterparts, until the birth of Nasa in 1958.

The youngest of four children, with an older sister and two older brothers, Katherine was born in White Sulphur Springs, a small town in Greenbrier County, 120 miles south of the West Virginian capital, Charleston. Her father, Joshua Coleman, had farmed and worked as a lumberman, and, in the 1930s, was employed at the local upmarket resort, the Greenbrier. He was also a self-taught mathematician. Her mother, Joylette, was a teacher.

Education for African-Americans in Greenbrier County ended at the age of 12. The Colemans’ response was to rent a house near an African-American high school run by the West Virginia State College on the outskirts of Charleston. Katherine entered that school as a 10-year-old. During holidays she worked at the Greenbrier, where she perfected her French, aided by a Parisian chef working at the resort.

In 1933, aged 15, she graduated to the West Virginia State College, where her teachers included William Schieffelin Claytor, an outstanding African-American mathematician, who was himself the subject of sustained discrimination during his career. He tailored courses for her, and she graduated with the highest honours in maths and French in 1937, aged only 18.

She then began teaching at the Marion school in Virginia, where she met James Goble, a chemistry teacher. In 1939 she moved back to West Virginia, to a school in Morgantown, and married James. The following year, partly as a consequence of a plan by the National Association for the Advancement of Colored People to bring about the desegregation of the hitherto all-white West Virginia University in Morgantown, she was one of three black students, and the first black woman, to enrol on a master’s course there. But then, after a single term, she became pregnant and forsook academia.

As her three daughters grew up, she returned to teaching. However, in 1952, the family, encouraged by James’s brother-in-law, moved to the Virginia peninsula. There, James took a job as a painter at the Newport News naval shipyard, while Katherine, in June 1953, began work at Langley.

After two weeks Katherine was seconded to the flight research division. Within it, and working with the manoeuvre and loads branch, she was in her element. After years of pressure, in 1958 she finally won the right to attend the editorial meetings of the guidance and control branch of what was to become, on 1 October of that year, the Aerospace Mechanics Division of the NACA’s successor, Nasa. She was the first woman to do so. Her designation changed, too. She was no longer a “computer”, but had become a “math aide”.

Her husband had died in 1956, and three years later she married James Johnson, an army and navy veteran. It was thus as Katherine Johnson that her report would be published, with the space engineer Ted Skopinski, who had said: “Katherine should finish the report. She’s done most of the work anyway.” She would ultimately become the author, or co-author, of 26 reports.

She retired from Nasa in 1986. In 2015 Barack Obama presented her with the presidential medal of freedom, the highest civilian honour in the US. The following year the BBC included her in its list of the 100 most influential women worldwide. West Virginia State University inaugurated a scholarship in her honour, and she received a plethora of honorary degrees and many awards from Nasa. For half a century she was a stalwart of the choir at Carver Presbyterian church in Newport News.

Her daughter Connie died in 2010 and her second husband in 2019. She is survived by her two other daughters, Joylette and Kathy, six grandchildren and 11 great-grandchildren.

• Katherine Johnson, mathematician and aerospace technologist, born 26 August 1918; died 24 February 2020