This letter proposes a multi-gateway designation framework to design real-time wireless sensor networks (WSNs) improving traffic schedulability, i.e., meeting the traffic time constraints. To this end, we resort to Spectral Clustering un-supervised learning that allows defining arbitrary k disjoint clusters without knowledge of the nodes physical position. In each cluster we use a centrality metric from social sciences to designate one gateway. This novel combination is applied to a time-synchronized channel-hopping (TSCH) WSN under earliest-deadline-first (EDF) scheduling and shortest-path routing. Simulation results under varying configurations show that our framework is able to produce WSN designs that greatly reduce the worst-case network demand. In a situation with 5gateways, 99% schedulability can be achieved with 3.5 times more real-time flows than in a random benchmark.