We study synchronization dynamics in networks of coupled oscillators with bimodal distribution of natural frequencies. This setup can be interpreted as a simple model of frequency synchronization dynamics among generators and loads working in a power network. We derive the minimum coupling strength required to ensure global frequency synchronization. This threshold value can be efficiently found by solving a binary optimization problem, even for large networks. In order to validate our procedure, we compare its results with numerical simulations on a realistic network describing the European interconnected high-voltage electricity system, finding a very good agreement. Our synchronization threshold can be used to test the stability of frequency synchronization to link removals. As the threshold value changes only in very few cases when aplied to the European realistic network, we conclude that network is resilient in this regard. Since the threshold calculation depends on the local connectivity, it can also be used to identify critical network partitions acting as synchronization bottlenecks. In our stability experiments we observe that when a link removal triggers a change in the critical partition, its limits tend to converge to national borders. This phenomenon, which can have important consequences to synchronization dynamics in case of cascading failure, signals the influence of the uncomplete topological integration of national power grids at the European scale.