We consider wireless sensor networks with multiple gateways and multiple classes of traffic carrying data generated by different sensory inputs. The objective is to devise joint routing, power control and transmission scheduling policies in order to gather data in the most efficient manner while respecting the needs of different sensing tasks (fairness). We formulate the problem as maximizing the utility of transmissions subject to explicit fairness constraints. We propose an efficient decomposition algorithm drawing upon large-scale decomposition ideas in mathematical programming, and prove the convergence of the algorithm. Furthermore, by exploring the property of the subproblem, we find that the utility maximization problem we consider can, in principle, be solved in polynomial time.