In business, a white knight may be a corporation, a private company, or a person that intends to help another firm. There are many types of white knights. Alternatively, a gray knight is an acquiring company that enters a bid for a hostile takeover in addition to the target firm and first bidder, perceived as more favorable than the black knight (unfriendly bidder), but less favorable than the white knight (friendly bidder).
The first type refers to the friendly acquirer of a target firm in a hostile takeover attempt by another firm. The intention of the acquisition is to circumvent the takeover of the object of interest by a third, unfriendly entity, which is perceived to be less favorable. The knight might defeat the undesirable entity by offering a higher and more enticing bid, or strike a favorable deal with the management of the object of acquisition.
In short, if Company T (target) is going to be acquired by Company H (hostile firm), but Company A (acquirer) can acquire ownership of Company T, then Company A would be acting as the white knight.
The second type refers to the acquirer of a struggling firm that may not necessarily be under threat by a hostile firm. The financial standing of the struggling firm could prevent any other entity being interested in an acquisition. The firm may already have huge debts to pay to its creditors, or worse, may already be bankrupt. In such a case, the knight, under huge risk, acquires the firm that is in crisis. After acquisition, the knight then rebuilds the firm, or integrates it into itself.