To restore the closed windows, you simply need to go to the main window of the program, under Windows > Dockable Dialogs > and click on the missing ones from your workspace or press its keyboard shortcuts. For the Layer window, the key shortcut is F7. For more information, access the Help menu from the main window.