Words "gadget" and "device" are translated the same in my language. What is the difference between these words in English?
Gadget is less formal and can only refer to a physical object.
A smartphone is an electronic device but a mother might chide her child for using "that gadget" too much. Saying gadget in this instance is informal and even derogatory.
Other than being less formal, the word "gadget" is interchangeable with "device" when referring to a physical object.
However, "device" can refer to abstract things while gadget can't: a "plot device" is a literary term for something that advances a story's plot. A person can also be "left to his/her own devices" which is an idiom that means "left to do whatever he or she wants without help."
Gadget can't be used in these examples.