Using density functional theory (DFT) calculations we thoroughly explored the influence of grain boundaries (GBs) in monolayer MoS2 composed of S-polar (S5|7), Mo-polar (Mo5|7), and (4|8) edge dislocation, as well as an edge dislocation-double S vacancy complex (S4|6), and a dislocation-double S interstitial complex (S6|8), respectively, on the electronic properties of MoS2 and the Schottky barrier height (SBH) in MoS2@Au heterojunctions. Our findings demonstrate that GBs formed by edge dislocations can significantly reduce the SBH in defect-free MoS2, with the strongest effect for zigzag (4|8) GBs (-20% reduction) and the weakest for armchair (5|7) GBs (-10% reduction). In addition, a larger tilt angle in the GBs leads to a more pronounced decrease in the SBH, suggesting that the modulation of SBH in the MoS2@Au heterostructure and analogous systems can be accomplished by GB engineering. Our findings also suggest that planar defects with high mobility in MoS2 may contribute to the memory switching effect observed in MoS2-based memtransistors and the reduction caused by the presence of planar defects can partially contribute to the discrepancy observed between experimental measurements and theoretical SBH predictions at the MoS2@Au heterojunction.