This work examines the trajectory optimization of an unmanned aerial vehicle (UAV) for the purpose of data-gathering from a backscattering wireless sensor network. The sensors are assumed to be remotely powered by distributed power-beacons using wireless power transfer (WPT) technology. The energy signals are backscattered towards the UAV, carrying information about the sensors' observations. Under a strict deadline constraint, the number of time slots that can be used to gather data is limited and, thus, the sensors must carefully determine their activation time slots according to the UAV's position at given times. The UAV trajectory and sensor activation decisions are coupled and, thus, jointly determined by minimizing the mean-squared error of the reconstructed sensor observations at the UAV. The trajectory is constrained by the UAV's maximum flight speed and minimum altitude, and the sensors' transmissions suffer from altitude-dependent path loss. An iterative procedure is proposed where the UAV trajectory, elevation angle and sensor activation are updated in turn until convergence. Performance comparison is provided through numerical simulations.