Not really.
All-in-one PCs generally use mobile CPU and relies on integrated graphics just like laptops. While the Intel HD graphics has come a long way in the past 4 years, they are still weak compared to dedicated GPUs. Additionally, I believe All-in-one PCs have a higher starting price than laptops and it is possible that a higher end one may have a dedicated mainstream mobile GPU like a nVidia 940m.
If $400 is the most you want to spend and you want to play current generation games pretty decently then I recommend a PS4 or Xbox One. The PS4 is more powerful of the two.