Lincoln was describing a democracy. What he means by 'Of the people' is the composition of the Government. The government is made up of persons who come from the people. 'By the people' refers to the population who chooses those people who should be in government.
Lincoln was describing a government made up of common people who were elected by common people to serve their interests. This is a democracy.
Gandhi came from a poor family, and he had dropped out of the cheapest college he could afford. Mavji Dave Joshiji, a Brahmin priest and family friend, advised Gandhi and his family that he should consider law studies in London.