An antenna structure includes a metal housing, a first feed source, and a first switching circuit. The metal housing includes a front frame, a backboard, and a side frame. The side frame defines a slot and the front frame defines a first gap and a second gap. The metal housing is divided into at least a first branch and a second branch by the slot, the first gap, and the second gap. The first feed source is electrically connected to the first branch. One end of the first switching circuit is electrically connected to the first branch. Another end of the first switching circuit is grounded.