Network coding is an emerging and powerful solution that can significantly improve the throughput and power efficiency of wireless networks by allowing mixing of various traffic flows via algebraic operations. With network coding, however, a packet has to wait to be network-coded with others given the stochastic nature of the packet arrival process of the various flows. This may result in large delay and packet-loss rate. To overcome this limitation, a novel network coding approach, which we shall refer to as opportunistic network coding (ONC), is presented in this paper. In this proposed approach, whether a packet is transmitted with or without network coding is determined by the buffer's queue state at a given node. We shall derive ONC's performance in terms of delay, packet-loss, and power consumption by formulating a Markov Chain and a Hidden Markov Model for the delay and power analysis. More importantly, we will develop an optimal ONC strategy with minimal average delay and zero packet-loss rate. In particular, we will show that there exists a fundamental tradeoff between average delay and power, which characterizes the performance limit of ONC.