The 23rd Amendment to the US Constitution was passed by Congress on March 29, 1961. It provides the District of Columbia with the ability to vote for president and vice-president. Up until this time, individuals who lived in the District of Columbia were unable to vote for the president since they did not live in a state and presidential electors were determined based on the number of representatives and senators a state had. This set the number of electors for the District of Columbia equal to that of the least populous state which means that it has three electors.
Text of the 23rd Amendment
The District constituting the seat of government of the United States shall appoint in such manner as the Congress may direct:
A number of electors of President and Vice President equal to the whole number of Senators and Representatives in Congress to which the District would be entitled if it were a state, but in no event more than the least populous state; they shall be in addition to those appointed by the states, but they shall be considered, for the purposes of the election of President and Vice President, to be electors appointed by a state; and they shall meet in the District and perform such duties as provided by the twelfth article of amendment.
The Congress shall have power to enforce this article by appropriate legislation.