Graph neural networks (GNNs) have achieved great success in recent years. Three most common applications include node classification, link prediction, and graph classification. While there is rich literature on node classification and graph classification, GNN for link prediction is relatively less studied and less understood. One common practice in previous works is to first compute node representations through a GNN, and then directly aggregate two node representations as a link representation. In this paper, we show the limitations of such an approach, and propose a labeling trick to make GNNs learn better link representations. Labeling trick assigns labels to nodes as their additional features according to nodes relationships with the target link. We show theoretically that GNNs applied to such labeled graphs can learn most expressive link representations. We also show that one state-of-the-art link prediction model, SEAL, exactly uses a labeling trick. Labeling trick brings up to 195% performance gains over plain GNNs, achieving 3 first places on the OGB link prediction leaderboard.