Announcing the decision to end ties with Taiwan, Arias said economics was the overarching reason for the switch.
At its peak in 1969, Taiwan had full diplomatic relations with 67 countries
UN shifted recognition from Taiwan to China in 1971
Washington severed foirmal ties in 1979 when it established relations with Beijing
Taiwan is officially recognised by 24 states, mostly small nations such as Solomon Islands and Nicaragua
Others, including the US, Japan and Britain, maintain semi-official ties
Noting that "China is the most successful emerging economy in the world", he said Costa Rica was "looking to strengthen the commercial ties and attract investment".
"Taiwan has been very generous and I thank it for the solidarity and co-operation it has shown for nearly 60 years, but I have taken this decision thinking of all the Costa Ricans."
Welcoming the Costa Rican decision, a spokeswomen for China's foreign ministry said Beijing was urging other Latin American allies of Taiwan to follow the move.
"We hope the relevant countries can follow the trend of the times and make the right choice," Jiang Yu told reporters.
China and Taiwan are believed to spend heavily to get diplomatic recognition, offering investment, loans and other incentives.
Arias said China is the Central American nation's No. 1 trading partner, buying more than $1bn worth of Costa Rican exports last year.
Since splitting amid civil war in 1949, Taiwan and China have fought to win the diplomatic allegiance of countries around the world.
Under what it calls its "One China Policy" Beijing refuses to have diplomatic ties with nations that recognise Taiwan.
According to Beijing, Taiwan is a renegade province it plans to eventually unify with the mainland, and has threatened to use force against the island if it makes any moves toward formal independence.
Taiwan's foreign minister, who did not say if his offer to resign was accepted by the president, said he believed that the Costa Rica case was an isolated one.
But he acknowledged instructing Taiwan embassies in Latin America to "take extreme precautions against any further pressure" by China.
On May 25, Huang met officials from Costa Rica and four other Latin American countries in Belize City in an effort to shore up Taiwan's diplomatic standing in the region.
Central America in particular has given Taiwan strong support and Taipei had expressed fears that if Costa Rica were to switch sides, other nations such as Nicaragua and Panama could soon follow suit.