Il y a trois personnes à la table.
Il y a trois personnes à table.
Which one is correct? If both are correct, is there a difference in meaning?
Both are correct. In the case of à la table, the definite article la suggests a certain table, that you can see, or that was talked about previously. In the case of à table, the meaning is rather that people are eating, without necessarily saying something about where they sit (they could be sitting at the same table, or at different tables, but they are certainly eating). In that case, à table just means eating.
à table is also present as a fixed expression in e.g. à table! (lunch is ready!) or passer à table, which means, literally go sit at the table for eating, but that everyone understands simply as starting dinner, lunch (forgetting any notion of table).
Table is easily related to eating in French: une bonne table means a good restaurant for example. Pour plus de détails sur les divers usages de table en français, on peut consulter cette (longue) référence: CNRTL.