There is a widespread debate over how gig workers should be classified. The passage of California Assembly Bill 5 (AB5) - a landmark legislation that aims to correct the misclassification of gig workers, has significant implications for workers, platforms, regulators, and the economy. In this research, leveraging the passage of AB5 as a shock for a natural experiment, we empirically investigate the impact of AB5 on gig workers in California to provide insights. With the data collected from a leading online labor market that connects clients and gig workers, we applied a Difference in Difference approach, and we found that the monthly earnings of gig workers in California, compared to those in other states, have a significantly higher increase after AB5 was signed into law. This effect stems from both increased daily earnings and increased working days. We discuss the implications for policymakers and platforms.