I accidentally undocked then closed it, and I don't know how to restore it.
2 Answers
Click on the location switcher above the left navigation (if you are in your inbox, it will say "Gmail ▼") and select "Tasks."
If you wanna Google Tasks Gadget in Gmail content area, try Gmail Tasks gadget: