Integrating mobile-edge computing (MEC) and wireless power transfer (WPT) is a promising technique in the Internet of Things (IoT) era. It can provide massive lowpower mobile devices with enhanced computation capability and sustainable energy supply. In this paper, we consider a wireless powered multiuser MEC system, where a multi-antenna access point (AP) (integrated with an MEC server) broadcasts wireless power to charge multiple users and each user node relies on the harvested energy to execute latency-sensitive computation tasks. With MEC, these users can execute their respective tasks locally by themselves or offload all or part of the tasks to the AP based on a time division multiple access (TDMA) protocol. Under this setup, we pursue an energy-efficient wireless powered MEC system design by jointly optimizing the transmit energy beamformer at the AP, the central processing unit (CPU) frequency and the offloaded bits at each user, as well as the time allocation among different users. In particular, we minimize the energy consumption at the AP over a particular time block subject to the computation latency and energy harvesting constraints per user. By formulating this problem into a convex framework and employing the Lagrange duality method, we obtain its optimal solution in a semi-closed form. Numerical results demonstrate the benefit of the proposed joint design over alternative benchmark schemes in terms of the achieved energy efficiency.