Johnson & Johnson Chief Executive Alex Gorsky is stepping aside, handing over the reins of the world’s largest health-products company to a longtime lieutenant after nearly a decade at the helm.

Mr. Gorsky, who is 61 years old, will become J&J’s executive chairman effective Jan. 3. Joaquin Duato, who led J&J’s pharmaceuticals business before becoming a Gorsky deputy, will become chief executive and join the company’s board of directors.

Mr. Gorsky has led the company to tremendous growth, making over J&J’s lineup to capitalize on technological advances. He navigated manufacturing issues that had plagued its signature consumer-health business, as well as thorny opioid and talcum-powder lawsuits. He leaves J&J still battling a pandemic that upended its factories, offices and labs while the company pursued a Covid-19 vaccine.

Health issues in his family, in part, prompted Mr. Gorsky to pursue the change, he said in an interview Thursday.

“In spite of the tremendous challenges we faced with Covid-19, I could not be more optimistic about the future of healthcare and the important role that J&J will play going forward,” Mr. Gorsky said.

The transition to Mr. Duato, a 32-year company veteran who is close to his predecessor, suggests J&J will chart the same kind of course it would have if Mr. Gorsky had stayed in the job.

Mr. Duato will confront several matters that Mr. Gorsky hasn’t resolved, including lawsuits alleging its Johnson’s talcum-powder caused cancer or mesothelioma and reports of rare side effects with J&J’s Covid-19 vaccine.

J&J has agreed to contribute $5 billion over nine years to help settle lawsuits blaming the company and drug distributors for the opioid crisis.

Mr. Duato, who is 59 years old and has been serving as a vice chairman on J&J’s executive team, may not be chief executive for as long as his predecessor, though J&J doesn’t have a mandatory retirement age for chief executives.

His tenure will give J&J’s board of directors time to consider successors. Possibilities include Ashley McEvoy, who runs J&J’s medical-devices business; Jennifer Taubert, the pharmaceutical unit’s chief; and Chief Financial Officer Joseph Wolk.

Each of the people declined through a company spokeswoman to comment. Mr. Duato said through the spokeswoman he is pleased to be able to benefit from Mr. Gorsky’s guidance and is excited to lead the J&J team. Since joining J&J’s executive team in July 2018, Mr. Duato has been providing strategic direction to J&J’s pharmaceutical and consumer-health businesses, while overseeing the company’s technology team and its supply chain.

J&J’s portfolio of products, from cancer therapies to contact lenses, knee replacements and surgical staplers, makes it a healthcare bellwether. The company, which has 136,000 employees, reported $82.6 billion in sales last year. Its market capitalization surpasses $470 billion.

The company reported $23.3 billion in sales in the second quarter, up 27% from the same period last year.

Mr. Gorsky, one of six siblings who grew up in a Michigan town of 3,500 people, graduated from the U.S. Military Academy at West Point and served as an Army captain before getting an M.B.A. at the University of Pennsylvania’s Wharton School of Business.

He joined J&J as a drug sales representative in 1988 and held a variety of leadership roles in pharmaceuticals and medical devices at the company, as well as doing a three-year stint at Swiss drugmaker Novartis AG .

Mr. Gorsky took the helm of J&J in April 2012, during a rocky period for the company, which is known for its namesake baby shampoo and Tylenol cold medicines but gets most of its sales from prescription drugs and devices.

Manufacturing problems had forced its consumer-products business, Tylenol’s home at the company, to recall tens of millions of bottles of the pain reliever and other popular over-the-counter medicines.

The recalls prompted Congress to hold hearings and federal health regulators to begin monitoring consumer-products manufacturing plants. It also turned off some parents, hurting J&J’s reputation and employee morale.

Mr. Gorsky guided the company out of the recalls, overhauling the consumer-products unit to focus more on personal care and beauty and upgrading the division’s plants.

He said he tried to emphasize to employees J&J’s mission of serving patients and its commitment to quality and compliance.

In addition, Mr. Gorsky sought to revive J&J’s medical-devices business, which faced slowing sales and recalls of its own. The unit sold off older product lines, while rolling out products that employed robotics and digital tools in surgery.

“His leadership plus his values have been such a gift to J&J, and how he has navigated his way through lots of opportunities and challenges,” Anne Mulcahy, J&J’s lead independent director, said in an interview. She said the board conducted a long and thorough process before deciding to elevate Mr. Duato.

Mr. Gorsky furthered the company’s expansion of its pharmaceuticals business, pushing into rare-disease drugs with the $30 billion acquisition of Actelion and accelerating J&J’s push into prostate, blood and other cancer drugs.

To reinforce J&J’s healthcare mission with employees and consumers, Mr. Gorsky encouraged company forays into global health. It opened a global public-health unit, which conducted research into an Ebola vaccine, helped build medical capacity in Africa and distributed HIV drugs.

J&J was among the few drugmakers to successfully and rapidly develop a Covid-19 vaccine. Health authorities looked forward to the single-dose shot, which promised to be a more convenient alternative than the two-dose vaccines from Pfizer Inc. and Moderna Inc.

Yet use has been less than expected, hurt by safety concerns and contamination problems at a contractor’s manufacturing plant that was going to help J&J increase production of doses.

Mr. Gorsky said he was proud of J&J’s vaccine and that the company worked with federal regulators to detect and address problems that arose. J&J is now making millions of doses, he said.

Write to Jonathan D. Rockoff at Jonathan.Rockoff@wsj.com