A 12-week-old baby had been signed off by social services the day before he died from catastrophic head and brain injuries, jurors heard.