The optimal design of gathering networks for the unconventional oil and gas production is a relevant problem, particularly with the shale boom. In this work, we address a network design problem in which the main decisions are the location and sizing of tank batteries for oil and gas separation together with the pipeline connections. The goal is to gather the oil, gas and water production from a large number of wellpads, being also possible to install junction nodes to merge the production at some points of the field. One major challenge is due to the steep production decline curves, requiring continued connections of new wells. To address this problem, we develop a complex multiperiod formulation accounting for the varying flows over the planning horizon. We propose an optimization framework to obtain efficient solutions within reasonable computational times. To circumvent the computational burden of a large-scale, nonlinear and non-convex model due to the fluid dynamics of multiphase flows, we propose a solution algorithm based on a bi-level decomposition. Near optimal solutions are found for real-world instances, suggesting that facility planning can considerably improve the economics of unconventional projects.