함께 is an adverb meaning "together (with), along with, (formal) in company with"
함께하다 is a verb meaning "share (sth with sb), join"
함께한 is composed of 함께하(다) + ㄴ(determiner particle to make a verb into an adjective)
너와 함께한 시간들이 너무도 행복했었어.
I was really happy about the times we shared together.
우리는 함께한 모든 시간을 소중히 간직한다.
We cherish every moment we have been together.
한 attached to the end of an action noun means "doing an action" composed of 하(다) + ㄴ