Boeing Co. is modifying portions of the electrical system on its forthcoming Dreamliner, after an in-flight fire aboard a test plane two weeks ago again threw the timetable for the flagship program into doubt.

The move marks just the latest setback for the Dreamliner, which is running nearly three years behind schedule and is in danger of again missing a key milestone: its first delivery to a customer, which Boeing has projected for early next year.

Boeing...