Not always. Czech Republic has a higher GDP per person than Poland. Poland is much bigger and has sea access. Both countries had a similar starting point after USSR collapse.
The reason landlocked countries have lower GDP is that they have to negotiate trade agreements at a disadvantage with small numbers of neighbours rather than just shipping goods to the whole world over the seas.