There are many different reasons open source projects get corporate support. This list is just a high-level survey. The items in it aren't mutually exclusive; often a project's financial backing will result from several, or even all, of these motivations:
Separate organizations with related software needs often find themselves duplicating effort, either by redundantly writing similar code in-house, or by purchasing similar products from proprietary vendors. When they realize what's going on, the organizations may pool their resources and create (or join) an open source project tailored to their needs. The advantages are obvious: the costs of development are divided, but the benefits accrue to all. Although this scenario might seem most intuitive for nonprofits, it often makes strategic sense even for for-profit competitors.
When a company sells services which depend on, or are made more attractive by, particular open source programs, it is naturally in that company's interests to ensure those programs are actively maintained.
For investors who like to think big, the right open source effort can create a new ecosystem — one in which those investors are more likely to flourish. A good example of this kind of investment, as of this writing in 2014, is the Meteor.com project.
The value of computers and computer components is directly related to the amount of software available for them. Hardware vendors—not just whole-machine vendors, but also makers of peripheral devices and microchips—have found that having high-quality free software to run on their hardware is important to customers.
Sometimes companies support a particular open source project as a means of undermining a competitor's product, which may or may not be open source itself. Eating away at a competitor's market share is usually not the sole reason for getting involved with an open source project, but it can be a factor.
Having your company associated with a popular open source application can be simply good brand management.
Dual-licensing is the practice of offering software under a traditional proprietary license for customers who want to resell it as part of a proprietary application of their own, and simultaneously under a free license for those willing to use it under open source terms (see ??? in ???). If the open source developer community is active, the software gets the benefits of wide-area debugging and development, yet the company still gets a royalty stream to support some full-time programmers.
Dual-licensing is controversial because it is not a "pure open source play" (as we say in business-speak), but rather yokes funding for open source development to a monopoly-based revenue stream. Whether this is a problem for you depends on where you fall on the "open source is just a way of software development" to "open source is a way of life" spectrum. The presence of revenue from a proprietary version does not necessarily mean that the free software version is worse off, and some very well-known and widely-used free software has had corresponding proprietary versions (MySQL is probably the most famous example). However, some developers dislike the thought that their contributions may end up in the proprietary version. Also, the mere presence of the proprietary version suggests the possibility that some of the best salaried developers' attention is going to the proprietary code, not the open source code, and this can undermine other developers' faith in the open source project.
None of is meant to persuade you not to do dual-licensing. You should just be aware that dual-licensing strategies are unlike the other business approaches I've listed here, and that it probably requires more care and sophistication to manage successfully.
A widely-used project can sometimes get significant contributions, from both individuals and organizations, just by soliciting donations, or by doing an organized crowdfunding campaign (e.g., via Bountysource, IndieGoGo, Kickstarter, etc). A word of caution: if your project accepts donations, do some public planning of how the money will be used before it comes in. Discussions about how to allocate money tend to go a lot more smoothly when held before there's actual money to spend; and anyway, if there are significant disagreements, it's better to find that out when the money is still theoretical than when it's real.
A funder's business model is not the only factor in how that funder relates to an open source community. The historical relationship between the two also matters: did the company start the project, or is it joining an existing development effort? In both cases, the funder will have to earn credibility, but, not surprisingly, there's a bit more earning to be done in the latter case. The organization needs to have clear goals with respect to the project. Is the company trying to keep a position of leadership, or simply trying to be one voice in the community, to guide but not necessarily govern the project's direction? Or does it just want to have a couple of committers around, able to fix customers' bugs and get the changes into the public distribution without any fuss?
Keep these questions in mind as you read the guidelines that follow. They are meant to apply to any sort of organizational involvement in a free software project, but every project is a human environment, and therefore no two are exactly alike. To some degree, you will always have to play by ear, but following these principles will increase the likelihood of things turning out the way you want.
 Aaron Wolf's Snowdrift.coop is a recent and interesting new approach to crowdfunding for libre projects. It focuses on sustainability beyond initial funding, by harnessing a limited positive feedback loop: pool donations are re-allocated, up to per-donor limits, depending on which projects people indicate support for. It's still in its early stages, so it's too early to tell if it will fly, but I thought it deserved a footnote. Check it out; by the time these words are published, Snowdrift might be out of alpha.