Here's how I reasoned through this before posting it. Others' methods turned out to be much simpler, though:
Since 5 isn't a factor of 24, it must be part of the sum group.
The rest of the numbers in the sum group then must add up to 7. Since we don't have a 7, there must be at least two more numbers in it, or in other words, at least three numbers in it total.
The two largest numbers remaining are 4 and 6. If they were the only numbers in the product group, then the sum group would add up to 11 instead of 12. And since those two numbers are the largest, any other set of two or fewer numbers would multiply to less than 24, so there must be at least three numbers in the product group.
Combining the above two sections, there must be exactly three numbers in each group.
If the 2 were in the sum group, then the third number in it would have to be another 5, but we don't have two 5s. Thus, the 2 must be in the product group.
If the 1 were in the product group, then the third number in it would have to be a 12, which we don't have. Thus, the 1 must be in the sum group.
Now that we know the 1 and 5 must be in the sum group, simple subtraction shows the third must be the 6, leaving the 2, 3, and 4 for the product group, which do indeed multiply to 24 as required.
Looking back, I think I know why my solution is longer now: I was originally going to specify that there must be three numbers in each group in the description, but I realized this would make the puzzle too easy. I then grafted steps to derive that fact onto my original solution instead of trying to re-solve it from scratch without needing that intermediate step.
As I think about this some more, here's another way to do it, based on loopy walt's answer and its key insight, but where (IMO) each step has a simpler justification:
We're given that group A has product 24 and group B has sum 12. As the sum and product of all six numbers are 21 and 720, we actually know the sum and product of both groups: group A has sum 9 (21-12) and group B has product 30 (720/24). Since 24 isn't divisible by 5, the 5 must go to group B. Since 30 isn't divisible by 4, the 4 must go to group A. Putting the 6 in group A now would make its sum too high, so it must go to group B. Now the sum of group B is 11 so far, so the only way to make it 12 is to put the 1 in it and the rest of the numbers in group A. This leaves only one candidate: 2, 3, 4 in group A and 1, 5, and 6 in group B. Testing this candidate reveals that it is indeed a solution.