In wireless sensor networks (WSN), a sink node receives signals from a large number of sensor nodes. Hence, the sink nodes are required to integrate compact antennas with high performances, such as high gain, dual polarizations, and omnidirectional radiation. In this paper, a high-gain omnidirectional dual-polarized (HGODP) antenna with a slot-cavity structure is proposed for WSN. The proposed antenna integrates dual omnidirectional antennas with orthogonal polarizations, i.e., a thin open-ended cavity for horizontal polarization and four folded slots for vertical polarization. Due to the orthogonal operating modes of the dual polarizations, the antenna configuration is constructed within a compact volume, but with an independent design. A prototype of the proposed antenna is fabricated and measured within a ruler-like profile. The experimental results show that the realized gains are higher than 6.5 dBi and are achieved for both dual polarizations in 2.37~2.54 GHz. With the merits of high gain, high isolation, and omnidirectional radiation, the proposed compact antenna exhibits promising usage for sink nodes in WSN.