The story
Two comes from Old English twā, and the W was pronounced: roughly TWAH. It is the same ancient number as German zwei, Dutch twee and Latin duo — and English still has the old W-form in the archaic twain.
In Middle English the vowel became a long, rounded "oh" — the word sounded like TWOH. A W followed by a strongly rounded vowel is a near-duplicate: both are made with pursed lips. The W was absorbed into the vowel, and as the vowel itself rose to "oo", the result was modern TOO.
The best evidence that the W was real is all around it. In words where the W did not sit next to that rounded vowel, it survived: twelve, twenty, twin, twice, twilight and between all belong to the same "two" family, and in every one of them the W is still pronounced.
The spelling two also does a useful job today: it separates the number from to and too, which sound exactly the same.
