From what I can gather, the expression originally comes from racing, used in its most literal sense. The expression "加油" then became a general expression of encouragement. There is nothing in the meaning of the constituent characters themselves, however, that conveys the meaning of encouragement. Not all Chinese words can have their current meaning explained in terms of their parts (like 肥皂). I found a simple summary of the history of the word here: http://zhidao.baidu.com/link?url=yiP6iAc0S-3VMztyCR8dID7OYfAskDbfmR8_jBZ0Zs9RXweUeYBLpzRYnNBNU5PyNcOLgyrxMKTaWGb49G3Xpa