The drops last year in the prices of oil and other commodities are threatening to stunt growth in poor African and Latin American nations that sought to use vast natural-resource wealth to climb the development ladder.

During a decadelong boom, governments on those continents vowed to use a windfall from surging raw-material prices to lift the vast underclass.

Governments that sought big development leaps by funding social-welfare programs and ambitious infrastructure initiatives, such as building roads, ports and power plants, may now have less money to do so.

"The good-governance records in many [Latin American] countries were linked to commodity prices, and this will be tested by the end of the commodity boom," said Jorge Castaneda, Mexico's former foreign minister.

The commodity-rich nations of Africa and Latin America are also facing a slowdown in China, a key buyer of exports from South Africa, Nigeria, Brazil, Chile and others. The two regions have been hit by a global selloff of emerging-market stocks, bonds and currencies.

The stakes are high for these often-volatile economies, which have some of the world's widest rich-poor gaps.

Economic slowdowns and declining investment flows threaten to stretch budgets. In Latin America, credit-ratings firm Fitch expects to downgrade more countries than it upgrades in 2015. In some cases, the declines could expose levels of corruption and mismanagement that weren't detected during the good times.

In resource-rich Brazil, millions of families escaped extreme poverty and joined a growing working class. Now, the country's growth has stagnated, investment is declining and currency declines are raising inflation fears.

Allegations of widespread corruption at the state oil firm Petroleo Brasileiro SA are adding to the pain. Brazilian officials had placed the oil firm at the center of a far-reaching plan to overhaul the economy and lift millions of poor into better paying jobs. Shares of Petrobras have fallen to multiyear lows.

The situation is worse in Venezuela, where President Nicolás Maduro is seeking to use oil wealth to fuel a Socialist revolution. With oil prices plunging, investors are gauging the risk that Venezuela may fail to pay its debt. Default would add to the woes of an economy saddled with double-digit inflation and shortages of basic items.

Even countries with more moderate policy mixes, such as Chile, among the biggest copper exporters, are getting hit. Chile cut its 2015 growth outlook by half a percentage point to 2.5% in December.

In Africa, the impact is magnified by the dependence of some fast-growing economies, such as Zambia, on the export of a single commodity. If the price of that commodity falls--in Zambia's case, copper--the fallout can be far-reaching. Countries that didn't balance budgets or curtail corruption while times were good will face painful choices, said Jack Allen of Capital Economics in London. Capital Economics forecasts average growth in sub-Saharan Africa to fall by one percentage point in 2015, to 4%, the slowest pace in more than a decade.

In South Africa, where raw materials account for some 60% of exports, the rand currency hit a six-year low in December as South Africa's gold and iron-ore exports declined in value.

One possible silver lining: Falling oil prices could lower South Africa's big import bill for much of the diesel and gasoline it consumes.

But falling oil prices are likely to hit producers such as Nigeria and Ghana. Nigeria, the region's biggest economy, is likely headed for its first deficit in more than 15 years. That could add volatility to a country facing a contentious national election (scheduled for February), and wrestling with the violent Islamist group Boko Haram.

"Governments won't have any choice but to take diversifying their tax base a bit more seriously now," Mr. Allen said.

Write to John Lyons at john.lyons@wsj.com and Patrick McGroarty at patrick.mcgroarty@wsj.com

Access Investor Kit for Petróleo Brasileiro SA

Visit http://www.companyspotlight.com/partner?cp_code=P479&isin=BRPETRACNOR9

Access Investor Kit for Petróleo Brasileiro SA

Visit http://www.companyspotlight.com/partner?cp_code=P479&isin=BRPETRACNPR6

Access Investor Kit for Petróleo Brasileiro SA

Visit http://www.companyspotlight.com/partner?cp_code=P479&isin=US71654V4086