This problem with your hat ends in informal wear (1-5)
I believe the answer is:
t-shirt
'informal wear' is the definition.
(I've seen this before)
'this problem with your hat ends' is the wordplay.
'problem with' indicates anagramming the letters.
'ends' indicates one should take the final letters.
The last letters of 'your hat' are 'rt'.
'this' with its letters anagrammed with 'rt' makes 'T-SHIRT'.
'in' is the link.
(Other definitions for t-shirt that I've seen before include "Thirst (anag.)" , "Light short-sleeved top" , "Informal garment" , "Simple top" , "Informal collarless top" .)