How you trade a gap really depends on the market, the individual issue, trend prior to gap, direction of gap as it relates to trend, etc...
For example, say a stock has been in a 4-day uptrend, and after hitting technical resistance, the stock gaps down to the prior days support area. Off the open, because momentum in the stock is to the upside, a buy on the open aiming for a quick gain is a high probability trade.
However, if the stock gaps down below the prior day's low, there is something wrong and the first rally to close the gap should be considered a shorting oppty prior to likely reversal.
If a stock has been falling for several days, and finally gaps down a significant amount (+10%), AND volume is much higher than normal, you're probably going to see a selling exhaustion. However, this does not imply a reversal, it simply suggests the downtrend may be ending. There is a chance for an early snap back, but not to the extent where one should expect the gap to close on a rally.
Whenever you see a gap taking place pre-market, first assess the broad trend of the market. A gap down after a strong rally is always an easy buying oppty. Very high probability of success, assuming you will accept a small but quick profit. After assessing the broad market, then assess the trend of the individual stock. Again, if the gap is against the prevalent trend, you can fade it with good odds of success.
On the other hand, a gap up after a prolonged rally can be either an exhaustion gap or a breakaway gap. To find out which it is, look on the daily and see if the gap is going to a level of heavy resistance (or support on a gap down). If it is gapping to major resistance after a strong rally, then it is probably an exhaustion gap and the gap is most likely the result of a buy-side imbalance triggered from greed on the part of the retail public. Therefore, the mm's are gapping to a level where there is heavy sell order accumulation in an attempt to meet all the buy orders accumulated over night. However, if in this same situation, after a prolonged rally, the stock gaps ABOVE major resistance, it could be a breakaway gap. There will be an accumulation of buy stops above resistance, so the gap to that level will set off additional buying while at the same time filling the accumulated sell-stop orders at the resistance zone. New shorts set up going into the resistance will add fuel to the buying as it becomes evident the stock has cleared their resistance level.
If a stock is in an uptrend and gaps down on the open, it is usually the result of the mm's trying to gap it down to trigger sell stops from weak hands. The buy orders from mutual funds, etc.. will need to be met, and after a strong rally, the accumulation of stops to protect the gains of the weaker players is the easiest area to get some stock.
Thus, there are several factors to consider, but there are usually good profits to be had from gap situations, granted that you assess the situation properly, trade quickly and aim for humble profit objectives.
I can go on and on, but I hope this helps to some extent.