Brent crude futures gained $1.11, or 2.1 percent, to settle at $54.91 a barrel, after trading between $52.51 and $56.56.
US West Texas Intermediate (WTI) crude ended $1.13, or 2.5 percent, higher at $46.54 a barrel, after hitting a session low at $44.35 and high at $47.78.
Oil futures were buoyed by US equity markets as major stock indices pared earlier losses. Crude futures have recently tracked stocks on Wall Street, which in 2018 recorded its worst year in a decade.
However, manufacturing data from China earlier added to ongoing concerns about a slowing global economy and increased output out of countries like Russia.
China's factory activity contracted for the first time in more than two years in December, highlighting the challenges facing Beijing as it seeks to end a bruising trade war with Washington.
"We still view some slippage in the Chinese economy as a significant bearish consideration given the fact that they had become the largest crude importer in the world," Jim Ritterbusch, president of Ritterbusch and Associates, said in a note
Euro zone manufacturing data also proved disappointing, as activity barely expanded at the end of 2018, according to a survey.
Worries about an economic slowdown and excess supply dragged down oil prices from multi-year highs reached in October 2018. Crude futures ended 2018 down for the first year since 2015, with WTI slumping 25 percent and Brent tumbling 21 percent.
Russian production hit a post-Soviet record in 2018, figures showed on Wednesday. Other data showed US output reached a record in October and Iraq boosted oil exports in December.
Surging shale output has helped make the United States the world's biggest oil producer, ahead of Saudi Arabia and Russia. Oil production has been at or near record highs in all three countries.
Signs of rising production illustrate the challenge facing the Organization of the Petroleum Exporting Countries and its allies, including Russia, which are seeking to prop up the market with a supply cut of 1.2 million barrels per day.
However, the energy minister for the United Arab Emirates, an OPEC member, said on Tuesday he remained optimistic about achieving a market balance in the first quarter.