Whether you are bailing out a rowboat or a bank, use the two-word spelling to describe the action of doing it (the verb form): “we need to bail out the boat before we can go fishing.”

But to label the activity itself (the noun form), use the one-word spelling: “this bailout is going to be expensive.”