Democracy is often associated with capitalism although it refers to a political system rather than an economic system and it is possible to have capitalist dictatorships as well as democratically elected socialist states.
Capitalism and democracy are related in principal however. Democracy can be though of as the capitalism of ideas rather than products. Like capitalism it results in highly efficient government under similar conditions. Politicians (producers) compete over who has the best ideas rather than products and voters (consumers) choose the politicians based on who provides the most benefit for the least cost.
Also similar to capitalism, democracy fails to reach its full potential when these principals are violated. The temptation is always there to cheat by competing not on the basis of ideas but rather on the basis of who is best able to crush the competition and obscure the message.