Automated entity relation extraction (RE) from literature provides an important source for constructing biomedical database, which is more efficient and extensible than manual curation. However, existing RE models usually ignore the information contained in sentence structures and target entities. In this paper, we propose BERE, a deep learning based model which uses Gumbel Tree-GRU to learn sentence structures and joint embedding to incorporate entity information. It also employs word-level attention for improved relation extraction and sentence-level attention to suit the distantly supervised dataset. Because the existing dataset are relatively small, we further construct a much larger drug-target interaction extraction (DTIE) dataset by distant supervision. Experiments conducted on both DDIExtraction 2013 task and DTIE dataset show our model's effectiveness over state-of-the-art baselines in terms of F1 measures and PR curves.