An accidental does apply across the bar line, but would need to be reapplied to any applicable notes after the second note under the tie. Ties don't apply to different notes. (You'd use a slur instead if you wanted the 1st note held until the 2nd note is attacked.)
If, say, you sharp a G and tie it across the bar line, then follow the second note under the tie with G♮, you may want to use a cautionary accidental to show that the sharp has come off. If the sharp wasn't part of the key signature, this isn't absolutely necessary, but it usually saves a bit of confusion.
The following example should make this clear.