Link prediction is to estimate the possibility of future links among nodes by utilizing known information such as network topology and node attributes. According to the characteristics of opportunistic networks (topological time-variation, node mobility and intermittent connections), this paper proposes a novel link prediction approach (IRWR-DBN) for opportunistic networks that is based on random walk and a deep belief network. First, we reconstruct the Markov probability transition matrix and define a similarity index-improved random walk with restart (IRWR). Second, we divide the opportunistic network into network snapshots. Then, the similarity matrix of each snapshot is calculated by using the IRWR index to construct a sample set. Finally, a predictive model is constructed based on a deep belief network which extracts the time-domain characteristics in the process of dynamic evolution of the opportunistic network. The experimental results on the ITC and MIT Reality datasets show that compared with methods, such as the similarity-based index (CN, AA, Katz, RA, RWR), convolutional neural network, and recurrent neural network, the proposed method is more accurate and stable. INDEX TERMS Opportunistic network, link prediction, random walk with restart, deep belief network, similarity index.