We associate a dimer algebra A to a Postnikov diagram D (in a disc) corresponding to a cluster of minors in the cluster structure of the Grassmannian (Gr) (k,n). We show that A is isomorphic to the endomorphism algebra of a corresponding Cohen-Macaulay module T over the algebra B used to categorify the cluster structure of (Gr) (k,n) by Jensen-King-Su. It follows that B can be realised as the boundary algebra of A, that is, the subalgebra eAe for an idempotent e corresponding to the boundary of the disc. The construction and proof uses an interpretation of the diagram D, with its associated plabic graph and dual quiver (with faces), as a dimer model with boundary. We also discuss the general surface case, in particular computing boundary algebras associated to the annulus.