You are right that it was originally a Biblical quotation (specifically Matthew 12:25).
A group that is "divided against itself" has factionalized, broken into groups that feel more loyalty and unity with themselves than with the whole, with the factions actively working against one another for the gain of their individual faction, rather than the group or organization as a whole. A group may be divided by various means, but if they all work towards to the good of the whole group, then it is not divided against itself.
It should also be note that a "house", in addition to meaning a physical dwelling structure, can also mean a lineage, dynasty or family. For example, the current British monarch is from the royal house of Windsor.
The full quote of Matthew 12:25 is
But he knew what they were thinking and said to them, “Every kingdom divided against itself will be laid waste, and no town or house divided against itself will stand.
(Source: http://www.usccb.org/bible/matthew/12), and thus we can see through parallelism that "house" is being used in its organizational, rather than physical structure, sense.