My design idea would be to have the switch hooked up with a digital pin on input (set to high at all times) and an analog pin set up on the output side. So when the button is pressed (just momentarily) the analog pin will get a different reading.
That's kinda over-complicated. A better way would be to wire the switch between ground and a digital pin, set the pin as an input, then set the pull-up on the pin (see how here: http://arduino.cc/en/Tutorial/DigitalPins). When the pin goes from HIGH to LOW - the switch is pressed (you'll need to add de-bounce logic or hardware too, by the way - but you would have had to do the same with your solution, too). In the end, one less pin is used (which you could use for something else).
This change in reading will trigger the relay to send 12 volts to the valve to open it. A small delay will be set, long enough to dispense the proper amount, and then the relay will turn off those closing the valve and the glass should then be filled.
This would work for a quick demonstration, but also may end up with the glass only partially filled (or overfilled) - depending on a number of factors. However, you could consider solving those problems as a "phase 2" of your project.
So will this idea work and do I have the proper materials?
Everything should work - the only problem would be potentially with your valve.
For this to work as you have described it, you would need to use a valve that is designed for a "gravity fed" system; as the way you are describing things, gravity would have to be working on the liquid to move it, correct? Most small solenoid valves, though, work similarly to sprinkler valves - they need the liquid or gas being controlled to be under pressure for the valve to work; if it isn't under pressure (and it must be at the rated pressure for the valve as well!) - the valve will fail to work properly.
That said - looking at the specs given on Ebay for that valve, it looks like it should work. It says that it is a "direct acting" valve, and requires no pressure for it to operate. It also says that it can be used on a "gravity fed" system - but that the flow rate will be very low due to the internal orifice size of 2.5 mm (which is pretty small - your liquid is going to come out as a trickle!).
Finally - it isn't readily apparent as to how easy it is to clean the valve. In systems that operate with food items, the valves need to be such that they can be easily cleaned (either by directly taking them apart and cleaning them, or via some form of disinfecting agent being ran through them). You need to keep this in mind if this is meant to be used as an actual system (vs simply a demonstration device). Otherwise, food-borne bacteria and other nastiness -will- crop up, and cause people to get very sick. So keep that in mind depending on what you plan to make (ie - if you are building an automated bar or similar, come up with a working cleaning procedure and follow it religiously).