I do not think Jim was especially gullible. He trusted Tom and Huck, and Tom betrayed him.
Huck considers Tom Sawyer a role model. He admires Tom’s creativity and what he sees as intelligence. He also thinks that Tom is morally superior, because Huck often makes decisions that are contrary to his society’s beliefs. Huck chooses not to turn Jim in, and he thinks this makes him a bad person because to his society that is wrong.
When Tom decided to help Jim “escape,” Huck was thrilled. Tom was creative and though he was impractical, he would get the job done with flair. Jim trusted Huck, and by extension trusted Tom. He had no reason not to. Neither of them had any idea that Tom knew that Jim was free the entire time, and was not telling anyone. Since Huck did not know this, how could Jim?
When Huck asks Tom why he tricked them, Tom replies that it was all part of his plan.
[He] had planned in his head from the start … for us to run him down the river on the raft …then tell him about his being free… and have them waltz him into town … and then he would be a hero, and so would we. (Ch 43)
Tom’s romantic notions about parading a freed Jim into town and having adventures demonstrate that he really did not care about Jim. All he wanted was to be a hero, and have some fun. Huck realizes only then that Tom is not really the great guy he thought he was. Jim is better off without him.