Fears of a coming recession are probably about as high right now as they have been over the past year. That's because the U.S. Federal Reserve recently predicted an economic downturn would descend upon us later in 2023. However, this is nothing investors focused on the long game should be worried about. There have been recessions before; when the market is affected, it always recovers. 

That's why instead of panicking, investors should seek to strengthen their portfolios with shares of companies that can perform relatively well in a recession and beyond. Dividend-paying stocks are excellent options in downturns since their regular payouts can help smooth out market losses.

Let's look at two great dividend stocks to consider buying before the economy worsens: Gilead Sciences (GILD -2.70%) and Amgen (AMGN -1.33%)

1. Gilead Sciences

Gilead Sciences is a biotech company with a particular focus on developing HIV medicines. The drugmaker is the leader in this area thanks to products like Biktarvy and Descovy for PrEP (preexposure prophylaxis). It also has a decent oncology lineup that is growing in prominence due to medicines such as Trodelvy. But the most crucial therapy in its portfolio over the past three years has arguably been Veklury.

This coronavirus medicine has remained effective and in use even as new variants of the coronavirus swept through the world. It has helped Gilead Sciences' revenue stay afloat as the company failed to earn approval for important candidates. But now, sales of Veklury are declining. It's not surprising, considering the pandemic has largely receded, and there is now less demand for vaccines and therapies for COVID-19.

Fortunately, the rest of Gilead Sciences' portfolio should pick up the slack eventually. In the first quarter, the company's revenue declined by 4% year over year to $6.4 billion. Excluding Veklury, Gilead Sciences' sales grew by a strong 15% compared to the prior-year period. The company's best-performing products included Biktarvy, whose revenue jumped by 24% year over year to $2.7 billion. Descovy's revenue of $449 million grew by 20% compared to the year-ago quarter.

And cancer drug Trodelvy saw its sales jump by 52% year over year to $222 million. These products will remain important for Gilead Sciences moving forward, as will Sunlenca, a new six-month long-acting HIV regimen that was approved late last year. The drugmaker's innovative wheel is still turning. The company boasts dozens of ongoing programs in various fields, from its HIV specialty to oncology and more.

So investors don't have to worry about the business running into patent cliffs. While that will certainly happen, Gilead Sciences can replace older medicines with newer ones. It has done so in the past few years. After losing patent exclusivity for such HIV medicines as Truvada, it earned approval for Sunlenca. Looking at Gilead Sciences' dividend profile, the company currently offers a yield of 3.68%, well above that of the S&P 500 at 1.74%.

The company's cash payout ratio of almost 31% leaves plenty of room for dividend hikes. It has increased its dividends by 31.6% in the last half-decade. Gilead Sciences' lifesaving medicines will remain in high demand even in a recession. Those factors, in addition to its strong portfolio and solid business, are among the many reasons to buy the company's stock before the next downturn. 

2. Amgen

Biotech giant Amgen has been going through a challenging period lately. The company's revenue growth was weak for most of 2022.

The first quarter of 2023 was no different. Amgen's sales declined by 2% year over year to $6.1 billion. The drugmaker has had to deal with losses of patent exclusivity and stiff competition for some of its products, which explains its recent troubles. But the company still has excellent prospects. First, it has managed to earn approval for new medicines such as asthma treatment Tezspire and cancer drug Lumakras.

AMGN Revenue (Quarterly YoY Growth) Chart

AMGN Revenue (Quarterly YOY Growth) data by YCharts

Second, Amgen has a rich pipeline that will continue to yield new approvals. One area the company is targeting is the biosimilar market. Most people in the U.S. think medicines are too expensive. Biosimilars offer cheap alternatives to famous -- but pricey -- drugs. Amgen's latest biosimilar report, released in late 2022, estimates that biosimilars have helped save the U.S. healthcare system $21 billion over the past six years.

This number should keep on growing as this market becomes increasingly important. In late January, Amgen launched the first biosimilar of AbbVie's highly popular rheumatoid arthritis therapy, Humira.

Amgen also has a rich pipeline of its own, with several dozen clinical trials. Furthermore, the company is currently acquiring Horizons Therapeutics for $27.8 billion in cash. The transaction should help strengthen Amgen's lineup and pipeline. Like other drugmakers, it benefits from the fact that it offers necessary goods, something that will help its business during times of economic turmoil. And the company's dividend history is impressive, too.

Amgen has raised its payouts by about 61% over the past five years. It currently boasts a yield of 3.57% and a reasonable cash payout ratio of 56.5%. Risk-averse dividend-seeking investors can find what they are looking for in this blue chip stock.