The two あり are verbs in the first proverb, and 勝ち is a noun in the second one.
Actually, those あり are a classical verb, not the -masu stem(連用形) of ある. The first あり is 連用形 to continue clauses, and the second one is 終止形, i.e., it's equivalent to the dictionary form ある in modern Japanese.
壁に耳あり、障子に目あり。 = 壁に耳があり、障子に目がある。
The copula だ is omitted in the second one.
負けるが勝ち。 = 負けるのが勝ちだ。
You need to know that classical Japanese sometimes remains in proverbs or set phrases, and classical Japanese grammar is rather different from the modern one.
e.g.
急がば回れ
言わぬが仏
百聞は一見に如かず
芝生に入るべからず
義を見てせざるは勇無きなり