The S&P/TSX composite index gained 56.65 points to 12,205.48, with most of the main sectors in positive territory after turning around earlier losses.
The TSX Venture Exchange added 15.76 points to 1,761.29.
On Monday, the TSX fell 238 points, or two per cent, as the price of gold plummeted and European debt concerns continued to weigh on the market.
On Tuesday, commodity prices recovered some ground.
Gold added $16.80 to US$1,830.10 an ounce after closing Monday's session down nearly $50. However, shares in Goldcorp Inc. (TSX:G) were off $1.23 at C$51.32.
Copper was unchanged at US$3.97 a pound. The industrial and mining sectors led the TSX higher, with shares in HudBay Minerals Inc. (TSX:HBM) up 15 cents at C$11.95.
Crude oil gained $2.02 to US$90.21 a barrel as a weaker U.S. dollar and expectations of falling U.S. stockpiles of crude oil and gasoline outweighed new forecasts of fragile global demand. On the TSX, Suncor Energy Inc. (TSX:SU) stock added six cents to C$28.57.
The Canadian dollar was up 0.68 of a cent at 101.48 cents US despite a number of troubling reports about the state of the Canadian economy.
"We are still taking our cue from global market sentiment which remains focused on Europe and global growth," said John Curran, senior vice-president at CanadianForex.
"This will eventually take its toll on the Canadian dollar as we will not be immune to another global economic downturn."
The Bank of Nova Scotia warned that Canada could be among the first of the world's advanced economies to fall into a another recession.
The bank's economists say Canada could produce a second negative quarter in the three-month period ending this month. That would constitute a technical recession, sometimes defined as two quarters of negative growth. Canada's economy contracted by 0.4 per cent in the April-June period.
Statistics Canada report that the net worth of Canadian households fell for the first time in a year last spring and indebtedness grew. Household worth fell 0.3 per cent to $184,300 in the second quarter, the first reversal of fortune since the second quarter of 2010.
And TD Economics revised its outlook for Canadian growth down to 2.2 per cent this year, about half a percentage point lower than in its June forecast.
"The main risks to our base-case outlook remain largely external. The global economy could turn out to be weaker than projected if policy-makers in the U.S. and Europe fail to deal with their fiscal problems," TD said.
Fears about the global economy have been causing huge market selloffs in recent weeks.
Wall Street markets closed higher despite data that showed an index of small business activity from the National Federation of Independent Business dropped to a 13-month low in August. The NFIB said companies surveyed had weaker expectations for sales and a bleaker view of the overall economy.
The Dow Jones industrial average added 44.73 points to 11,105.85, while the broader Standard & Poor's index added 10.6 points to 1,172.87 and the Nasdaq index gained 37.06 points to 2,532.15.
"Eurozone concerns continue to dominate the psyche of dealers and investors alike with see-saw momentum spawned by several events characterizing market activity at the moment," Curran said.
European markets rose Tuesday after Italy's finance minister confirmed that officials had met with China's sovereign wealth fund about buying Italian bonds.
In addition, German Chancellor Angela Merkel sounded a note of optimism regarding Greece's chances of getting the next batch of bailout cash from the so-called troika -- the European Commission, the European Central Bank and the International Monetary Fund. Representatives from the three organizations are due back in Athens this week.
But even if Greece gets its next instalment of euro8 billion (US$11 billion), the markets think that the country will have to concede defeat some time over the next year.
Meanwhile, on the Canadian corporate front, Brookfield Asset Management Inc. (TSX:BAM.A) and Brookfield Renewable Power Fund (TSX:BRC.UN) said they planned to combine their power generating facilities into one of the world's largest renewable power businesses with some US$13 billion of assets.
Shares in Brookfield Asset Management lost 19 cents to $27.33, while shares in Brookfield Renewable Power added $1.46 to $24.85.
Thompson Creek Metals Co. Inc. (TSX:TCM) said it was increasing the reserve estimate for its Endako molybdenum operation in British Columbia by nine per cent and extending its life by nearly two years to 2028. The company's stock was down five cents at $7.54.
Air Canada could face its second strike this year as flight attendants are expected to endorse a strike Tuesday that could begin as early as Sept. 21. Shares lost five cents to $1.60.Suggest a correction