beieinander
close together
Spatially close together or next to each other.
Die beiden Schwestern saßen eng beieinander auf dem Sofa.
The two sisters sat close together on the sofa.

together
Loading your saved state.
close together
Spatially close together or next to each other.
Die beiden Schwestern saßen eng beieinander auf dem Sofa.
The two sisters sat close together on the sofa.

The word is made up of the preposition 'bei' (near/with) and the pronoun 'einander' (each other). So it literally means 'near each other'.
Die beiden Häuser stehen sehr dicht beieinander.
The two houses stand very close together.
As an adverb, 'beieinander' (together) describes the way people or things are positioned in relation to one another. It usually comes after the conjugated verb.
Nach dem Streit saßen sie lange schweigend beieinander.
After the argument, they sat together in silence for a long time.
When referring to a social group, 'beieinander' (together) is often combined with adverbs that describe the atmosphere, e.g. 'gemütlich beieinander sitzen' (to sit together cozily) or 'friedlich beieinander sein' (to be together peacefully).
Am Lagerfeuer saß die ganze Gruppe noch lange gemütlich beieinander.
The whole group sat together cozily around the campfire for a long time.
The expression 'nicht ganz beieinander sein' (not to be quite with it) is a fixed colloquial phrase. It means that someone is confused or unfocused.
Er redet heute nur wirres Zeug, ich glaube, er ist nicht ganz beieinander.
He's only talking nonsense today; I think he's not quite with it.
together
'zusammen' and 'beieinander' can both say that people or things are not separate. 'zusammen' is more general and often emphasizes a shared action: people do something together. 'beieinander' tends to emphasize that people or things are spatially close or gathered as a group. Learners may confuse the words because both express closeness. When it is about doing something together, 'zusammen' is usually more natural. When it is about being close together in one place, 'beieinander' fits well.

Im Krankenhaus sitzt die Familie beieinander und wartet auf die Ärztin.
At the hospital, the family sits together and waits for the doctor.
Beim Einkaufen sucht ihr zusammen ein Geschenk für eure Freundin.
While shopping, you choose a gift for your friend together.