A good primer on the psychological effects of mimicry is the review by Chartrand and Lakin (2013), who define mimicry as "the automatic imitation of gestures, postures, mannerisms, and other motor movements" (also see this earlier question).
They cite several findings suggesting that mimicry indeed contributes to positive relationships between people. For example, people being mimicked become more prosocial to the mimicker, as expressed in increased liking, empathy, helping behavior, and felt closeness. Chartrand and Lakin describe mimicry as a kind of "social glue" bringing people together.
More specifically with regard to your question, several studies are in line with the idea that mimicry increases trust.
For example, as per Chartrand and Lakin (2013):
Van Swol (2003) had a confederate, while trying to change the participant’s opinion on a topic, imitate his or her behaviors (or
not). Later, participants reported that they perceived the mimicking confederate as more knowledgeable and persuasive, even though
they did not ultimately change their opinion on the topics. In a twist on this, Bailenson & Yee (2005) found that participants liked a computer avatar that mimicked their head movements more than one that didn’t, and
were more persuaded by its arguments.
They also cite studies that measured trust specifically:
Trusting behaviors tend to increase after a person has been mimicked. For example, mimicked participants seem more willing than those who were not mimicked to divulge personal information to strangers, even when that
information could be embarrassing (Gueguen et al. 2012). According to Maddux et al. (2008), mimicry also smoothes the progress of negotiations. They instructed negotiators to either mimic or not mimic partners’ behavior and later assessed mimicry’s impact on negotiation outcomes. Mimickers experienced higher individual and dyadic gains and were more willing to come to an agreement with others regarding a difficult decision, and the
relationship was mediated by interpersonal trust (see also Swaab et al. 2011)
Does mimicry always work?
NLP holds that Mirroring is a powerful technique. Note, however, that the cited findings only document modest mean differences, showing that mimicry can have an effect. Nevertheless, the size and importance of this effect may still be questioned.
Furthermore, under some circumstances mimicry may not work or even backfire.
Lakin and Chartrand (2013):
It turns out that one does need to mimic the “right” people to enjoy the positive consequences of mimicry. Recent research has found that mimicking may backfire (in terms of public opinion about one’s social competence) if
someone mimics an unfriendly person. After watching someone mimicking unfriendly behaviors, people thought the mimicker was less socially competent than someone who mimicked a friendly partner or someone who mimicked no one (Kavanagh et al. 2011).
In addition mimicry may work less well if people mimic outgroup members, if one has to mimic nonaffiliative expressions (e.g., anger), or when people have a proself mindset or have high levels of social anxiety (Chartrand & Lakin, 2013).
Finally, in some situations, complementary (doing the opposite) rather than imitative behavior may increase liking. For example, Tiedens and Fragale (2003) asked confederates to mimic or complement bodily postures of dominance or submission (using an expanded or constricted posture). Participants whose behavior was complemented (the confederate showed a submissive posture when the participant was behaving in a dominant way, or vice versa) liked the confederate more. Thus, in power or status relationships mimicry may have different effects.
Chartrand, T. L., & Lakin, J. L. (2013). The antecedents and consequences of human behavioral mimicry. Annual Review of Psychology, 64, 285–308. doi:10.1146/annurev-psych-113011-143754