The transport minister was picked by her Social Democratic party after its leader, Antti Rinne, quit as PM. She will be sworn in this week.
She will lead a centre-left coalition with four other parties, all headed by women, three of whom are under 35.
Mr Rinne stepped down after losing the confidence of a coalition member over his handling of a postal strike.
When she takes office, Ms Marin will be the world's youngest sitting prime minister. New Zealand PM Jacinda Ardern is 39, while Ukrainian premier Oleksiy Honcharuk is 35.