Ware gave the 49ers (21-10) the lead for good at 65-63 on a 3-pointer with 3:10 remaining, and Anderson scored the final five points of the game.
The eighth-seeded Anteaters (13-19) closed to 74-72 when Eric Wise scored, but Anderson responded with a three-point play.
Anderson scored 13 of his 18 points in the second half. Ware, the conference player of the year, briefly left the game with an apparent leg cramp with 2:48 to go but returned.
Wise led UC Irvine with 23 points, including 19 in the second half. Patrick Rembert added 19 points and nine rebounds.
Long Beach State took a 30-29 lead into halftime despite missing 10 of its first 11 shots.