Filtering based on List-Id header
The "Has the words" field in GMail's filter editor apparently supports a keyword called listid.
Here is an example for filtering the www-html@w3.org mailing list.
List-Id: <www-html.w3.org>
Simply enter the following in Gmail's "Has the words" field:
listid: www-html.w3.org