Mike Caffey’s basket with 1:27 to play gave the 49ers a 48-46 lead. Ennis made a pair of free throws with 6 seconds left for the final margin.
Long Beach State (13-8, 9-1) avenged its only Big West loss, a 79-73 loss to the Mustangs at San Luis Obispo, Calif., on Jan. 3.
The Mustangs (9-11, 5-5) led 30-25 at halftime and were ahead by as many as eight points in the first half.
Kyle Odister scored 11 points off the bench for Cal Poly.
The 49ers have won 23 consecutive home conference games. Their last Big West home loss was on Feb. 17, 2010 to Pacific.