VMI led 45-44 when Kamdyn Curfman hit a 3-pointer with 16:22 remaining but Gardner scored the next seven points for East Carolina and the Pirates led the rest of the way.
Greg Parham scored a career-high 23 points for the Keydets. Jake Stephens added 10 points.
East Carolina faces Navy on the road on Friday. VMI plays Marist at home on Friday.