late 14c., in the most basic sense, "to make fit for eating by the action of heat," but especially "to prepare in an appetizing way by various combinations of material and flavoring," from cook (n.).
Old English had gecocnian, cognate with Old High German cochon, German kochen, all verbs from nouns, but the Middle English word seems to be a fresh formation from the noun in English. The figurative sense of "to manipulate, falsify, alter, doctor" is from 1630s (phrase cook the books is attested by 1954). Related: Cooked, cooking. Phrase what's cooking? "what's up, what's going on" is attested by 1942. To cook with gas "do well, act or think correctly" is 1930s jive talk.
The expression "NOW YOU'RE COOKING WITH GAS" has bobbed up again — this time as a front page streamer on the Roper Ranger, and as the banner line in the current advertising series of the Nashville (Tenn.) Gas and Heating Company, cleverly tying gas cooking to local food products and restaurants. "Now you're cooking with gas" literally took the gas industry by the ears around December 1939 — Remember? — when it flashed forth in brilliant repartee from the radio programs of the Maxwell Coffee Hour, Jack Benny, Chase and Sanborn, Johnson Wax, Bob Hope and sundry others. [American Gas Association Monthly, vol. xxiii, 1941]