That law is the Railway Labor Act, which, despite he name, covers both rail workers and airline employees. Those are two of the most heavily unionized US industries, and the law places considerable hurdles in the way of any union that wants to strike. The pilots have cleared exactly zero of those hurdles so far. If federally mediated union negotiations reach an impasse, a union can be given permission to strike.
Spirit Airlines pilots struck for a week in 2010, but the airline was much smaller then - with only about 1% of domestic air traffic at that time. The last time a major airline was grounded by a strike was 25 years ago when Northwest Airlines pilots went on strike for two weeks. Northwest was then the fourth largest US airline, but back then there was far less consolidation in the industry.