For weeks, the program, which aims to prepare young minds for middle school, struggled to keep its doors open.