There are many qualities investors need to be successful. Perhaps one of the most important is patience. After all, it's almost impossible to build serious wealth overnight, and get-rich-quick schemes are often scams. But the incredible phenomenon known as compounding works, and it needs time to turn even a modest investment into a much more substantial sum.

That's why investors who take a patient approach and invest in the right stocks can reap the benefits for a lifetime. Let's look at two stocks that can help you grow your wealth for decades: Gilead Sciences (GILD 3.62%) and Medtronic (MDT -0.76%).

Gilead Sciences

Gilead Sciences is a major biotech company whose primary therapeutic area of focus is HIV. The company has become a leader in this field thanks to products such as Biktarvy and Descovy, which are among the most-prescribed medicines in the HIV and HIV pre-exposure prophylaxis (PrEP) markets, respectively.

Biktarvy has been particularly impressive. Gilead Sciences reports that since its 2018 U.S. approval, the HIV therapy has gained market share every quarter. Biktarvy extended its lead in the U.S. with a 45% share of the market as of Dec. 31, up 3% year over year.

The lesson here is that Gilead Sciences is adept -- especially (though not exclusively) in the HIV space -- at developing new medicines, which is critical to the long-term success of drugmakers. Last year, the biotech earned another important approval with Sunlenca, a six-month, long-acting HIV regimen (the first of its kind) that promises to join the list of the company's blockbuster products. Elsewhere, Gilead Sciences' oncology division is growing, with the unit's sales soaring by 71% year over year in 2022; this was partly thanks to breast cancer medicine Trodelvy, which recently earned a new indication.

Gilead Sciences has been a leader in the coronavirus treatment space thanks to its antiviral drug, Veklury (remdesivir). Although sales of Veklury have been up and down, the medicine recently proved effective at reducing the risk of mortality in a real-world study with more than 500,000 patients. In 2022, the company's total sales remained flat at $27.1 billion. Excluding Veklury, Gilead Sciences' top line grew by 8% year over year.

Sunlenca, Trodelvy, Biktarvy, and Descovy will help the company continue to grow its top and bottom lines, especially as the impact of Veklury on its financial results fades. And beyond the next few years, Gilead Sciences' proven ability to innovate will likely lead to brand-new products and consistently solid financial results.

Lastly, Gilead Sciences is an excellent dividend stock with a yield of 3.77%. The company has raised its payouts by 74% over the past decade. Opting for dividend reinvestment helps boost stock-market returns over time; this factor only adds to Gilead Sciences' excellent long-term prospects.

2. Medtronic

Medtronic is one of the world's most prominent medical device specialists, with hundreds of products on the market that target many different disease areas. It also has a presence in 150 countries. The company's strength comes from several sources.

First, navigating the healthcare sector is challenging, given its highly regulated nature. Yet, Medtronic has been doing it for decades while successfully developing newer and better products. Over the past 12 months, the company has earned about 150 regulatory approvals.

Second, Medtronic arguably benefits from high switching costs. Many of its products, notably those within its "medical surgical portfolio," are installed in scores of healthcare facilities in the U.S. and elsewhere. Once physicians get accustomed to using products and trusting the lives and well-being of their patients to them, it can be challenging for them to switch to competing devices.

Medtronic generally records solid revenue and profits. In its latest quarterly update -- for the third quarter of its fiscal year 2023, which ended Jan. 27 -- revenue remained flat at $7.7 billion although it increased by 4.1% in constant currency. Adjusted earnings per share decreased slightly, by 4% year over year, to $1.30.

Of note, the company is in the process of spinning off its patient monitoring and respiratory interventions unit. Although that will lead to less diversity, it should help boost Medtronic's revenue growth. At any rate, this change should do little to hinder the company's long-term prospects as it boasts multiple growth avenues. That includes its work in the exciting robotic-assisted surgery (RAS) market, with its Hugo RAS system, and its MiniMed 780G continuous glucose monitoring (CGM) system, which gives people with diabetes a better way to keep a close eye on their blood glucose levels.

Medtronic also scores high in the dividend department, having raised its payouts for 45 consecutive years. If you're an income-seeking and risk-averse investor, looking for a forever stock that can deliver excellent returns, you need look no further than this device maker.