WASHINGTON — President Obama’s decision to travel to Cuba next month and meet with President Raúl Castro reflects his determination to do as much as possible before he leaves office to pry open the historic and ideological barricades that have separated the United States from its neighbor since the Cold War.

It also represents something of a familiar gamble for Mr. Obama, who in becoming the first sitting American president to visit Cuba in 88 years will be testing his conviction that aggressive engagement, rather than harsh isolation, is the best way to prod an adversary to change.

In announcing the trip on Thursday, Mr. Obama was betting on the power of his office and the force of his personal diplomacy to persuade Mr. Castro to do more to open his mostly state-run economy and respect human rights. The Cuban leader has been unwilling to take those steps since the two presidents announced in December 2014 that they would move toward normalized relations after a half-century of hostility.

If Mr. Obama is wrong, the visit could instead highlight the deep differences that persist between the two nations.