BILOXI, Miss.—Even as pressure mounts on Newt Gingrich to drop out of the Republican presidential contest, the former House speaker is preparing to stick it out—with a new short-term goal of keeping Mitt Romney from securing the nomination.

Mr. Gingrich faced crucial primary tests Tuesday in Alabama and Mississippi, states where he campaigned hard to jump-start his flagging campaign. He lost both to former Sen. Rick Santorum, though he appeared on track to finish a respectable second in both. Even if he had realized his dream...